es6 create arrays from an array based on value of an object propertry in it code example
Example: number to array js
const arrayOfDigits = numToSeparate.toString().split("");
const arrayOfDigits = numToSeparate.toString().split("");