Answers for "javascript get numeric value of string"

132

how to convert string to int js

let string = "1";
let num = parseInt(string);
//num will equal 1 as a int
Posted by: Guest on February-24-2020
3

js get number from string

thenum = "foo3bar5".match(/\d+/)[0] // "3"
Posted by: Guest on January-08-2021

Code answers related to "javascript get numeric value of string"

Code answers related to "Javascript"

Browse Popular Code Answers by Language