Created
August 14, 2019 12:32
-
-
Save gatarelib/317bf5931cd6bafa1f045f843c99fd5e to your computer and use it in GitHub Desktop.
Andela assessment Question
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const digitize = (n) => { | |
r = n.toString().split(''); | |
r.forEach((el, i, a) => { a[i] = parseInt(el); }) | |
return r | |
} | |
digitize(715) // [7, 1, 5] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment