Convert String Number to Number in JavaScript ?
You can make use of the unary plus(+)
operator to convert string number to number.
let strNum = "1000";
let num = +strNum;
console.log(num);
// 1000
Convert String Number to Number in JavaScript ?
You can make use of the unary plus(+)
operator to convert string number to number.
let strNum = "1000";
let num = +strNum;
console.log(num);
// 1000