const converToArray = number => [...`${number}`].map(el => parseInt(el))
// 事例
converToArray(5678) // [5, 6, 7, 8]
converToArray(12345678) // [1, 2, 3, 4, 5, 6, 7, 8]
const converToArray = number => [...`${number}`].map(el => parseInt(el))
// 事例
converToArray(5678) // [5, 6, 7, 8]
converToArray(12345678) // [1, 2, 3, 4, 5, 6, 7, 8]