--- title: Math.E slug: Web/JavaScript/Reference/Global_Objects/Math/E tags: - JavaScript - Math - Propriété - Reference translation_of: Web/JavaScript/Reference/Global_Objects/Math/E original_slug: Web/JavaScript/Reference/Objets_globaux/Math/E ---
La propriété Math.E représente la base du logarithme naturel, e, et vaut environ 2.718.
E étant une propriété statique de Math, il doit toujours être utilisé avec la syntaxe Math.E, et non pas être appelé comme propriété d'un autre objet Math qui aurait été créé (Math n'est pas un constructeur).
Math.ELa fonction suivante renvoie la valeur de e :
function getNapier() {
return Math.E;
}
getNapier(); // 2.718281828459045
| Spécification | Statut | Commentaires |
|---|---|---|
| {{SpecName('ES1')}} | {{Spec2('ES1')}} | Définition initiale. Implémentée avec JavaScript 1.0. |
| {{SpecName('ES5.1', '#sec-15.8.1.1', 'Math.E')}} | {{Spec2('ES5.1')}} | |
| {{SpecName('ES6', '#sec-math.e', 'Math.E')}} | {{Spec2('ES6')}} | |
| {{SpecName('ESDraft', '#sec-math.e', 'Math.E')}} | {{Spec2('ESDraft')}} |
{{Compat("javascript.builtins.Math.E")}}