Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

convert string to number javascript

let num = Number("123"); // 123
let num = Number("123.45"); // 123.45
let num = Number("blah"); // NaN (not a number)
 
PREVIOUS NEXT
Tagged: #convert #string #number #javascript
ADD COMMENT
Topic
Name
9+5 =