count 0 to 10 js code example
Example: javascript count digits
var length = (number + '').replace('.', '').replace('-', '').length; // for numbers that can be floats or negatives
var length = (number + '').replace('.', '').replace('-', '').length; // for numbers that can be floats or negatives