updated changes
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
### Number to array of digits
|
||||
|
||||
use `parseInt()` to get only the integer part of the quotient.
|
||||
use `Array.reverse()` to return the array in the same order as the number.
|
||||
Convert the number to a string, split the string using `split()`.
|
||||
use `parseInt()` to convert every element back to integer.
|
||||
|
||||
```js
|
||||
const num2array = (n) =>{
|
||||
|
||||
Reference in New Issue
Block a user