← Back to challenges

Length of Number

JavaScriptHardnumbers

Instructions

Create a function that takes a number num and returns its length.

Examples

numberLength(10) ➞ 2

numberLength(5000) ➞ 4

numberLength(0) ➞ 1

Notes

N/A

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