Answers for "convert array to integer in javascript"

8

how to convert string to int a array in javascript

var a = "1,2,3,4";

var b = a.split(',').map(function(item) {
    return parseInt(item, 10);
});
Posted by: Guest on November-15-2019
4

convert array to number

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

integer to array javascript

Array.from(String(12345), Number);
Posted by: Guest on June-11-2020

Code answers related to "convert array to integer in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language