From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../reference/global_objects/math/e/index.html | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 files/ja/web/javascript/reference/global_objects/math/e/index.html (limited to 'files/ja/web/javascript/reference/global_objects/math/e') diff --git a/files/ja/web/javascript/reference/global_objects/math/e/index.html b/files/ja/web/javascript/reference/global_objects/math/e/index.html new file mode 100644 index 0000000000..c837f079a9 --- /dev/null +++ b/files/ja/web/javascript/reference/global_objects/math/e/index.html @@ -0,0 +1,67 @@ +--- +title: Math.E +slug: Web/JavaScript/Reference/Global_Objects/Math/E +tags: + - JavaScript + - Math + - Property + - Reference +translation_of: Web/JavaScript/Reference/Global_Objects/Math/E +--- +
{{JSRef}}
+ +

Math.E プロパティは自然対数の底 (e)、約 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)}}
+ +

解説

+ +

EMath オブジェクトの静的プロパティなので、 Math オブジェクトを生成してプロパティとして使用するのではなく、常に Math.E として使用するようにしてください (Math はコンストラクターではありません)。

+ +

+ +

Math.E の使用

+ +

以下の関数は、e を返します。

+ +
function getNapier() {
+  return Math.E;
+}
+
+getNapier(); // 2.718281828459045
+
+ +

仕様書

+ + + + + + + + + + + + +
仕様書
{{SpecName('ESDraft', '#sec-math.e', 'Math.E')}}
+ +

ブラウザーの互換性

+ + + +

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

+ +

関連情報

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