floor(log10(n) + 1);
function getlength(number) { return number.toString().length; }
let number = 152121 return number.toString().split('').length // -> 6 // Hey, it's 6 digits!