does split in js works with numbers code example
Example: split the numbers js
var num = 123456;
var digits = num.toString().split('').map(iNum => parseInt(iNum, 10));
console.log(digits);
var num = 123456;
var digits = num.toString().split('').map(iNum => parseInt(iNum, 10));
console.log(digits);