Answers for "how to convert string in array to numberr"

11

convert an array of strings to numbers

let result = ["1", "2", "3", "4"].map(i=>Number(i));
console.log(result);
Posted by: Guest on February-24-2021
0

string number to array

b="1,2,3,4".split(',').map(x=>+x)
// [1,2,3,4]
Posted by: Guest on October-23-2021

Code answers related to "how to convert string in array to numberr"

Code answers related to "Javascript"

Browse Popular Code Answers by Language