Math.LN10
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
Die statische Dateneigenschaft Math.LN10
repräsentiert den natürlichen Logarithmus von 10, ungefähr 2.303.
Probieren Sie es aus
function getNatLog10() {
return Math.LN10;
}
console.log(getNatLog10());
// Expected output: 2.302585092994046
Wert
Eigenschaften von Math.LN10 | |
---|---|
Schreibbar | nein |
Aufzählbar | nein |
Konfigurierbar | nein |
Beschreibung
Da LN10
eine statische Eigenschaft von Math
ist, wird sie immer als Math.LN10
verwendet und nicht als Eigenschaft eines von Ihnen erstellten Math
-Objekts (Math
ist kein Konstruktor).
Beispiele
Verwendung von Math.LN10
Die folgende Funktion gibt den natürlichen Logarithmus von 10 zurück:
js
function getNatLog10() {
return Math.LN10;
}
getNatLog10(); // 2.302585092994046
Spezifikationen
Specification |
---|
ECMAScript® 2025 Language Specification # sec-math.ln10 |
Browser-Kompatibilität
Report problems with this compatibility data on GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
LN10 |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.