Math.E
속성은 자연로그의 밑 값 e를 나타내며 약 2.718의 값을 가집니다.
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Property attributes of Math.E |
|
---|---|
Writable | no |
Enumerable | no |
Configurable | no |
설명
E
는 Math
의 정적 속성이므로, 사용자가 생성한 Math
객체의 속성으로 접근할 수 없고 항상 Math.E
를 사용해야 합니다. (Math
는 생성자가 아닙니다)
예제
Math.E
사용하기
다음 함수는 e 값을 반환합니다.
function getNapier() {
return Math.E;
}
getNapier(); // 2.718281828459045
명세
Specification | Status | Comment |
---|---|---|
ECMAScript 1st Edition (ECMA-262) | Standard | Initial definition. Implemented in JavaScript 1.0. |
ECMAScript 5.1 (ECMA-262) The definition of 'Math.E' in that specification. |
Standard | |
ECMAScript 2015 (6th Edition, ECMA-262) The definition of 'Math.E' in that specification. |
Standard | |
ECMAScript (ECMA-262) The definition of 'Math.E' in that specification. |
Living Standard |
브라우저 호환성
BCD tables only load in the browser