Splitting Up Numbers

Published by Deep Xavier in

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]

numSplit(121317) ➞ [100000, 20000, 1000, 300, 10, 7]

Notes

N/A

Watch a quick demo on how Edabit works.