This page was translated from English by the community.Learn more and join the MDN Web Docs community.
Math.LOG2E
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015년 7월.
Math.LOG2E 속성은 e의 로그 2 값, 약 1.442의 값을 가집니다.
In this article
시도해 보기
function getLog2e() { return Math.LOG2E;}console.log(getLog2e());// Expected output: 1.4426950408889634Property attributes ofMath.LOG2E | |
|---|---|
| 쓰기 가능 | 불가능 |
| 열거 가능 | 불가능 |
| 설정 가능 | 불가능 |
설명
LOG2E는Math의 정적 속성이므로, 사용자가 생성한Math 객체의 속성으로 접근할 수 없고 항상Math.LOG2E를 사용해야 합니다. (Math는 생성자가 아닙니다)
예제
>Math.LOG2E 사용하기
다음 함수는 e의 로그 2 값을 반환합니다.
js
function getLog2e() { return Math.LOG2E;}getLog2e(); // 1.4426950408889634명세
| Specification |
|---|
| ECMAScript® 2026 Language Specification> # sec-math.log2e> |