Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how calculate number of digits of number

let number = 152121
return number.toString().split('').length     // -> 6

// Hey, it's 6 digits!
Source by dev.to #
 
PREVIOUS NEXT
Tagged: #calculate #number #digits #number
ADD COMMENT
Topic
Name
8+1 =