array of objects to array javascript code example Example: number to array js const arrayOfDigits = numToSeparate.toString().split("");