Math.LN10 - JavaScript | MDN

Try it

function getNatLog10() {
  return Math.LN10;
}

console.log(getNatLog10());
// Expected output: 2.302585092994046

Value

๐™ผ๐šŠ๐š๐š‘.๐™ป๐™ฝ๐Ÿท๐Ÿถ=ln(10)โ‰ˆ2.303\mathtt{Math.LN10} = \ln(10) \approx 2.303
Property attributes of Math.LN10
Writableno
Enumerableno
Configurableno

Description

Because LN10 is a static property of Math, you always use it as Math.LN10, rather than as a property of a Math object you created (Math is not a constructor).

Examples

Using Math.LN10

The following function returns the natural log of 10:

js

function getNatLog10() {
  return Math.LN10;
}

getNatLog10(); // 2.302585092994046

Specifications

Specification
ECMAScriptยฎ 2027 Language Specification
# sec-math.ln10

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.