Spread operator and numbers in JavaScript

The spread operator is not applicable to numbers:

let arr = [...12345]; // there will be an error

To solve the problem, you should convert the number to a string, like this:

let arr = [...String(12345)]; // gets an array ['1', '2', '3', '4', '5']
enru