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/operators/division/index.html | 76 ++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 files/ja/web/javascript/reference/operators/division/index.html (limited to 'files/ja/web/javascript/reference/operators/division') diff --git a/files/ja/web/javascript/reference/operators/division/index.html b/files/ja/web/javascript/reference/operators/division/index.html new file mode 100644 index 0000000000..e3fd9b96f9 --- /dev/null +++ b/files/ja/web/javascript/reference/operators/division/index.html @@ -0,0 +1,76 @@ +--- +title: 除算 (/) +slug: Web/JavaScript/Reference/Operators/Division +tags: + - JavaScript + - Language feature + - Operator + - Reference +translation_of: Web/JavaScript/Reference/Operators/Division +--- +
{{jsSidebar("Operators")}}
+ +

除算演算子 (/) は、左のオペランドを被除数とし右のオペランドを除数としたオペランド同士の商を生成します。

+ +
{{EmbedInteractiveExample("pages/js/expressions-division.html")}}
+ +
+ + + +

構文

+ +
Operator: x / y
+
+ +

+ +

基本の除算

+ +
1 / 2              // 0.5
+
+Math.floor(3 / 2) // 1
+
+1.0 / 2.0         // 0.5
+
+ +

ゼロ除算

+ +
2.0 / 0     // Infinity
+
+2.0 / 0.0   // Infinity, because 0.0 === 0
+
+2.0 / -0.0  // -Infinity
+ +

仕様

+ + + + + + + + + + +
仕様
{{SpecName('ESDraft', '#sec-multiplicative-operators', 'Division operator')}}
+ +

ブラウザーの互換性

+ + + +

{{Compat("javascript.operators.division")}}

+ +

関連項目

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