From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../operators/division_assignment/index.html | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 files/ja/web/javascript/reference/operators/division_assignment/index.html (limited to 'files/ja/web/javascript/reference/operators/division_assignment/index.html') diff --git a/files/ja/web/javascript/reference/operators/division_assignment/index.html b/files/ja/web/javascript/reference/operators/division_assignment/index.html new file mode 100644 index 0000000000..f00c9d14c8 --- /dev/null +++ b/files/ja/web/javascript/reference/operators/division_assignment/index.html @@ -0,0 +1,63 @@ +--- +title: 除算代入 (/=) +slug: Web/JavaScript/Reference/Operators/Division_assignment +tags: + - Assignment operator + - JavaScript + - Language feature + - Operator + - Reference + - 代入演算子 + - 演算子 + - 言語機能 +translation_of: Web/JavaScript/Reference/Operators/Division_assignment +--- +
{{jsSidebar("Operators")}}
+ +

除算代入演算子 (/=) は変数を右オペランドの値で除算し、結果をその変数に代入するものです。

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

構文

+ +
演算子: x /= y
+意味:   x  = x / y
+ +

+ +

除算代入の使用

+ +
// 以下の変数があると想定する
+//  bar = 5
+
+bar /= 2     // 2.5
+bar /= 'foo' // NaN
+bar /= 0     // Infinity
+ +

仕様書

+ + + + + + + + + + +
仕様書
{{SpecName('ESDraft', '#sec-assignment-operators', 'Assignment operators')}}
+ +

ブラウザーの互換性

+ + + +

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

+ +

関連情報

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