compute number of digits in number code example
Example 1: find number of digits in a number
floor(log10(n) + 1);
Example 2: get number of digits in a number
function getlength(number) {
return number.toString().length;
}
floor(log10(n) + 1);
function getlength(number) {
return number.toString().length;
}