Answers for "parse int from array of strings javascript"

15

javascript Convert an array of strings to numbers

const toNumbers = arr => arr.map(Number);
toNumbers(['1', '2', '3','4']);     // [1, 2, 3, 4]
Posted by: Guest on July-02-2020
0

js convert string array to number array

const atrArr = ['7', '2', '5']
let numbersArr = strArr.map(c => +c); //[7, 2, 5]
Posted by: Guest on February-17-2022

Code answers related to "parse int from array of strings javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language