Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

parseint

let str = '24.5'
let numberVariable = parseInt(str, 10)
// numberVariable = 24 (of type Number)

//Format
parseInt(string, base)
// To get the decimal value also (24.5), use parseFloat(string)
 
PREVIOUS NEXT
Tagged: #parseint
ADD COMMENT
Topic
Name
9+6 =