showing results for - "separate digits in javascript"
Anaelle
11 Apr 2019
1const n = 123456;
2Array.from(n.toString()).map(Number);
3// [1, 2, 3, 4, 5, 6]