Answers for "string to array number"

1

convert array string to number

// CONVERT ARRAY STRING TO ARRAY NUMBER
const arrStr = ["1", "3", "5", "9"];
const nuevo = arrStr.map((i) => Number(i));
console.log(nuevo);
// [1,3,5,9];
Posted by: Guest on June-09-2020
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 "string to array number"

Code answers related to "Javascript"

Browse Popular Code Answers by Language