A propriedade Math.E
representa a base dos logarítmos naturais, aproximadamente 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 |
Descrição
Como E
é uma propriedade estática de Math
, sempre use-a como Math.E
, ao invés de uma propriedade de um objeto Math
que você criou (Math
não é um construtor).
Exemplos
Usando Math.E
A seguinte função retorna o valor de e:
function getNapier() {
return Math.E;
}
getNapier(); // 2.718281828459045
Especificações
Especificação | Status | Comentário |
---|---|---|
ECMAScript 1st Edition (ECMA-262) | Padrão | Definição inicial. Implementado no JavaScript 1.0. |
ECMAScript 5.1 (ECMA-262) The definition of 'Math.E' in that specification. |
Padrão | |
ECMAScript 2015 (6th Edition, ECMA-262) The definition of 'Math.E' in that specification. |
Padrão | |
ECMAScript (ECMA-262) The definition of 'Math.E' in that specification. |
Padrão em tempo real |
Compatibilidade de navegadores
BCD tables only load in the browser
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.