Answers for "how to change sting ti number in js"

6

how to change a string to number in javascript

let theInt = parseInt("5.90123"); //5
let theFloat = parseFloat("5.90123"); //5.90123
Posted by: Guest on May-03-2020
1

JS cast a string into a Number

const input = "42";
const number = Number.parseInt(input, 10);
Posted by: Guest on September-15-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language