Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

convert a string to number in javascript

var x = parseInt("1000", 10); // you want to use radix 10
    // so you get a decimal number even with a leading 0 and an old browser ([IE8, Firefox 20, Chrome 22 and older][1])
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #convert #string #number #javascript
ADD COMMENT
Topic
Name
6+1 =