Answers for "parseint from string array js"

0

parseint array javascript

var arr = ['1','2','3'];
arr = arr.map(x => parseInt(x));

console.log(arr);
//Array(3) [ 1, 2, 3 ]
Posted by: Guest on November-16-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 "Javascript"

Browse Popular Code Answers by Language