| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/es/docs/Web/JavaScript/Reference/Global_Objects/Math/E | [Back] [Original] |
Get to know MDN better
Esta pgina ha sido traducida del ingls por la comunidad. Aprende ms y nete a la comunidad de MDN Web Docs.
This feature is well established and works across many devices and browser versions. Its been available across browsers since julio de 2015.
La propiedad Math.E representa la base de los logaritmos naturales, e, aproximadamente 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
Atributos de la propiedad Math.E | |
|---|---|
| Sobrescribir | No |
| Numerable | No |
| Configurable | No |
Porque E es una propiedad esttica de Math, siempre usted lo usa como Math.E, en lugar de como una propiedad de un objeto Math creado (Math no es un constructor).
Math.ELa funcin siguiente devuelve e:
function getNapier() {
return Math.E;
}
getNapier(); // 2.718281828459045
| Specification |
|---|
| ECMAScript 2027 LanguageSpecification # sec-math.e |
This page was last modified on 11 feb 2025 by MDN contributors.
MathMath.abs()Math.acos()Math.acosh()Math.asin()Math.asinh()Math.atan()Math.atan2()Math.atanh()Math.cbrt()Math.ceil()clz32()Math.cos()cosh()Math.exp()Math.expm1()f16round()Math.floor()fround()Math.hypot()imul()Math.log()log1p()Math.log2()Math.log10()Math.max()Math.min()Math.pow()Math.random()Math.round()Math.sign()Math.sin()sinh()Math.sqrt()sumPrecise()Math.tan()Math.tanh()Math.trunc()Your blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |