Math.log10

log10 — Returns the base 10 logarithm of a number.

Description

Math.log10(number number)

Parameters

Name Description Type Default Optional
number number No

Examples

Example #1 – log10 example
console.log(Math.log10(3)); // 0.47712125471966244 console.log(Math.log10(8)); // 0.9030899869919435 console.log(Math.log10(-3)); // NaN

External references