Answers for "turn array of strings into numbers javascript"

10

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
4

convert array to number

let x = [1,2,3,4,5]
let num = +x.join("")
Posted by: Guest on August-19-2020

Code answers related to "turn array of strings into numbers javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language