Find Number of Digits in Number

Published by hazeltonbw in

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

Examples

numOfDigits(1000) ➞ 4

numOfDigits(12) ➞ 2

numOfDigits(1305981031) ➞ 10

numOfDigits(0) ➞ 1

Notes

Try to solve this challenge without using strings.

Watch a quick demo on how Edabit works.