Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how set type of string value to number in js

var text = '42px';
var integer = parseInt(text, 10);
// returns 42
 
PREVIOUS NEXT
Tagged: #set #type #string #number #js
ADD COMMENT
Topic
Name
2+3 =