DEV Community

Discussion on: How to count number of digits in a number?

Collapse
 
christianparpart profile image
Christian Parpart

What about ceil(log10(n))
or -int(-log10(n))

I find both of them know beautiful. :)