[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/zh-TW/docs/Web/JavaScript/Reference/Global_Objects/Math/E [Back]  [Original]

Math.E - JavaScript | MDN

MDN Web Docs

View in English Always switch to English

Math.E

Baseline Widely available

This feature is well established and works across many devices and browser versions. Its been available across browsers since 20157.

Math.E Euler's number e 2.718

In this article

function compoundOneYear(interestRate, currentVal) {
  return currentVal * Math.E ** interestRate;
}

console.log(Math.E);
// 2.718281828459045

console.log((1 + 1 / 1000000) ** 1000000);
// 2.718280469 (approximately)

console.log(compoundOneYear(0.05, 100));
// 105.12710963760242

.=e2.718\mathtt{Math.E} = e \approx 2.718
Math.E

E Math Math.E Math Math

Math.E

e

js
function getNapier() {
  return Math.E;
}

getNapier(); // 2.718281828459045

Specification
ECMAScript 2027 LanguageSpecification
# sec-math.e


Web Proxy Viewer  |  New URL  |  Original Page