Answers for "parseInt array"

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

Code answers related to "Javascript"

Browse Popular Code Answers by Language