Skip to main content

how to convert string into integer in java script

 in javascript we can convert the string into integer by the code as


let a = prompt("hey whats your age")

a = Number.parseInt(a)


this way we can convert the string into the number

Comments