Parameters or Arguments
number The variety to use in the calculation. It need to be a price that is greater than zero
The log10() characteristic returns the base-10 logarithm of a number.
If the wide variety is 0, the log10() function will return -Infinity.
If the number is a poor value, the log10() function will return NaN.
Math is a placeholder object that includes mathematical functions and constants of which log10() is one of these functions.
console.log(Math.log10(1)); console.log(Math.log10(2.5)); console.log(Math.log10(0)); console.log(Math.log10(-4));
In this example, we have invoked the log10() characteristic the usage of the Math class.
We have written the output of the log10() function to the web browser console log, for demonstration purposes, to exhibit what the log10() characteristic returns.
The following will be output to the net browser console log:
0 0.3979400086720376 -Infinity NaN
In this example, the first output to the console log again zero which is the base-10 logarithm of 1.
The 2d output to the console log returned 0.3979400086720376 which is the base-10 logarithm of 2.5.
The 2nd output to the console log lower back -Infinity due to the fact that the variety provided was zero
The 2d output to the console log lower back NaN seeing that the quantity supplied was once a poor value.