This page was translated from English by the community. Learn more and join the MDN Web Docs community.

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. Itโ€™s been available across browsers since โจ2015๋…„ 7์›”โฉ.

Math.E ์ •์  ๋ฐ์ดํ„ฐ ์†์„ฑ์€ ์˜ค์ผ๋Ÿฌ ์ˆ˜๋ฅผ ์˜๋ฏธํ•˜๋ฉฐ, ์ž์—ฐ๋กœ๊ทธ์˜ ๋ฐ‘ ๊ฐ’ e๋ฅผ ๋‚˜ํƒ€๋‚ด๋ฉฐ ์•ฝ 2.718์˜ ๊ฐ’์„ ๊ฐ€์ง‘๋‹ˆ๋‹ค.

์‹œ๋„ํ•ด ๋ณด๊ธฐ

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

console.log(Math.E);
// Expected output: 2.718281828459045

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

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

๊ฐ’

๐™ผ๐šŠ๐š๐š‘.๐™ด=eโ‰ˆ2.718\mathtt{Math.E} = e \approx 2.718
Property attributes of Math.E
์“ฐ๊ธฐ ๊ฐ€๋Šฅ๋ถˆ๊ฐ€๋Šฅ
์—ด๊ฑฐ ๊ฐ€๋Šฅ๋ถˆ๊ฐ€๋Šฅ
์„ค์ • ๊ฐ€๋Šฅ๋ถˆ๊ฐ€๋Šฅ

์„ค๋ช…

E๋Š” Math์˜ ์ •์  ์†์„ฑ์ด๋ฏ€๋กœ, ์ƒ์„ฑํ•œ Math ๊ฐ์ฒด(Math๋Š” ์ƒ์„ฑ์ž๊ฐ€ ์•„๋‹™๋‹ˆ๋‹ค)์˜ ์†์„ฑ ๋Œ€์‹  ํ•ญ์ƒ Math.E๋ฅผ ์‚ฌ์šฉํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

์˜ˆ์ œ

Math.E ์‚ฌ์šฉํ•˜๊ธฐ

๋‹ค์Œ ํ•จ์ˆ˜๋Š” e ๊ฐ’์„ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

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

getNapier(); // 2.718281828459045

๋ช…์„ธ์„œ

Specification
ECMAScriptยฎ 2026 Language Specification
# sec-math.e

๋ธŒ๋ผ์šฐ์ € ํ˜ธํ™˜์„ฑ

๊ฐ™์ด ๋ณด๊ธฐ