← Back to challenges

Splitting Up Numbers

JavaScriptHardarraysnumbers

Instructions

Create a function that takes a number num and returns each place value in the number.

Examples

numSplit(39) ➞ [30, 9]

numSplit(-434) ➞ [-400, -30, -4]

numSplit(100) ➞ [100, 0, 0]

Notes

N/A

javascript
Loading editor…
to run
Walks through the solution with reasoning and edge cases.