a newer one »Change svnroot

safely coercing strings to numbers with javascript

Snippet

safely coercing strings to numbers) #javascript

return (+value + '') === value ? +value : value;

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.