ES6 - Math.log10(x) Function



Returns the base 10 logarithm of X.

Syntax

Math.log10(x)    

Parameter

  • X − represents a number

Example

console.log("---Math.log10()---") 
console.log("Math.log10(10): "+Math.log10(10)) 
console.log("Math.log10(16.7): "+Math.log10(10))         

Output

---Math.log10()--- 
Math.log10(10): 1 
Math.log10(16.7): 1           
Advertisements