Math.LOG10E
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.
Thuộc tính dữ liệu tĩnh Math.LOG10E biểu thị logarithm cơ số 10 của e, xấp xỉ 0.434.
Try it
function getLog10e() {
return Math.LOG10E;
}
console.log(getLog10e());
// Expected output: 0.4342944819032518
Giá trị
Property attributes of Math.LOG10E | |
|---|---|
| Writable | no |
| Enumerable | no |
| Configurable | no |
Mô tả
Vì LOG10E là thuộc tính tĩnh của Math, bạn luôn sử dụng nó dưới dạng Math.LOG10E, thay vì là thuộc tính của một đối tượng Math bạn tạo ra (Math không phải là constructor).
Ví dụ
>Sử dụng Math.LOG10E
Hàm sau trả về logarithm cơ số 10 của e:
js
function getLog10e() {
return Math.LOG10E;
}
getLog10e(); // 0.4342944819032518
Đặc tả kỹ thuật
| Specification |
|---|
| ECMAScript® 2027 Language Specification> # sec-math.log10e> |