The Math log10() static method returns the base 10 logarithm of a number.
console.log(Math.log10(100000));
// 5
console.log(Math.log10(2));
// 0.3010299956639812
console.log(Math.log10(1));
// 0
console.log(Math.log10(0));
// -Infinity