Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript count digits

var length = (number + '').replace('.', '').replace('-', '').length;  // for numbers that can be floats or negatives
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #count #digits
ADD COMMENT
Topic
Name
4+4 =