API Reference

Returns the digits of a number as an array

function digits(n: number): number[]

// Example:

digits(39482) //=> [3, 9, 4, 8, 2]