Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

split the numbers js

var num = 123456;
var digits = num.toString().split('').map(iNum => parseInt(iNum, 10));
console.log(digits);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #split #numbers #js
ADD COMMENT
Topic
Name
6+8 =