dígitos de conteo de JavaScript
var length = (number + '').replace('.', '').replace('-', '').length; // for numbers that can be floats or negatives
Narshe
var length = (number + '').replace('.', '').replace('-', '').length; // for numbers that can be floats or negatives
function getlength(number) {
return number.toString().length;
}