From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- .../reference/global_objects/math/e/index.html | 86 ++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 files/pt-br/web/javascript/reference/global_objects/math/e/index.html (limited to 'files/pt-br/web/javascript/reference/global_objects/math/e/index.html') diff --git a/files/pt-br/web/javascript/reference/global_objects/math/e/index.html b/files/pt-br/web/javascript/reference/global_objects/math/e/index.html new file mode 100644 index 0000000000..36b01b0430 --- /dev/null +++ b/files/pt-br/web/javascript/reference/global_objects/math/e/index.html @@ -0,0 +1,86 @@ +--- +title: Math.E +slug: Web/JavaScript/Reference/Global_Objects/Math/E +tags: + - JavaScript + - Math + - Propriedade + - Referencia +translation_of: Web/JavaScript/Reference/Global_Objects/Math/E +--- +
{{JSRef}}
+ +

A propriedade Math.E representa a base dos logarítmos naturais, aproximadamente 2.718.

+ +

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

+ +
{{EmbedInteractiveExample("pages/js/math-e.html")}}
+ + + +
 
+ +
{{js_property_attributes(0, 0, 0)}}
+ +

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çãoStatusComentário
{{SpecName('ES1')}}{{Spec2('ES1')}}Definição inicial. Implementado no 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')}} 
+ +

Compatibilidade de navegadores

+ + + +

{{Compat("javascript.builtins.Math.E")}}

+ +

Veja também

+ + -- cgit v1.2.3-54-g00ecf