Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Convert a string to a number in js

// try using parsInt(x)
// you can then use typeof(x) to confirm 
var myString = "555";
var myInt = parseInt(string);
console.log(typeof myInt); // number
 
PREVIOUS NEXT
Tagged: #Convert #string #number #js
ADD COMMENT
Topic
Name
5+1 =