Created
December 19, 2017 10:07
-
-
Save xerosanyam/c4d1920cc67469d369bb946f43e5aeb0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function countDigits(digits){ | |
var i = 0; | |
while(digits>0){ | |
i++ | |
digits = parseInt(digits/10) | |
} | |
console.log(i) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment