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.
Math.LN10
は静的データプロパティで、 10 の自然対数、およそ 2.302 を表します。
試してみましょう
function getNatLog10() {
return Math.LN10;
}
console.log(getNatLog10());
// Expected output: 2.302585092994046
値
Math.LN10 のプロパティ属性 | |
---|---|
書込可能 | 不可 |
列挙可能 | 不可 |
設定可能 | 不可 |
解説
LN10
は Math
オブジェクトの静的プロパティなので、 Math
オブジェクトを生成してプロパティとして使用するのではなく、常に Math.LN10
として使用するようにしてください (Math
はコンストラクターではありません)。
例
Math.LN10 の使用
以下の関数は、10 の自然対数を返します。
js
function getNatLog10() {
return Math.LN10;
}
getNatLog10(); // 2.302585092994046
仕様書
Specification |
---|
ECMAScript® 2025 Language Specification # sec-math.ln10 |
ブラウザーの互換性
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.