Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 612 Bytes

File metadata and controls

25 lines (16 loc) · 612 Bytes

Find Number of Digits in Number

Create a function that will return an integer number corresponding to the amount of digits in the given integer number.


Examples:

numberOfDigitsInNumber(1000) ➞ 4
numberOfDigitsInNumber(12) ➞ 2
numberOfDigitsInNumber(1305981031) ➞ 10
numberOfDigitsInNumber(0) ➞ 1

Notes:

  • Try to solve this challenge without using strings!

Solution: