Answers for "get number of digits in a number"

5

find number of digits in a number

floor(log10(n) + 1);
Posted by: Guest on February-20-2021
2

javascript count digits

var length = (number + '').replace('.', '').replace('-', '').length;  // for numbers that can be floats or negatives
Posted by: Guest on August-21-2020
0

get number of digits in a number

function getlength(number) {
    return number.toString().length;
}
Posted by: Guest on May-11-2021

Code answers related to "get number of digits in a number"

Code answers related to "Javascript"

Browse Popular Code Answers by Language