Here's an alternative to Nicolás Fantone'sNicolás Fantone's answer. You could argue it's maybe a little less readable. The emphasis is that Array.from() can take an optional map function as a parameter. There are some performance gains this way since no intermediate array gets created.
const n = 123456; Array.from(n.toString(), (val) => Number(val)); // [1, 2, 3, 4, 5, 6]