Splitting Up Numbers

Published by Mubashir Hassan 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]

Notes

N/A

Watch a quick demo on how Edabit works.