aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/javascript/reference/operators/division_assignment
diff options
context:
space:
mode:
authorMasahiro FUJIMOTO <mfujimot@gmail.com>2021-09-26 01:32:15 +0900
committerMasahiro FUJIMOTO <mfujimot@gmail.com>2021-10-03 13:37:37 +0900
commitfb129cca2082cbc57f93025a2e46797e5fb4a0f3 (patch)
treeea14ee032bb589704833b4cf6bf9bf79f973cc1d /files/ja/web/javascript/reference/operators/division_assignment
parent3d9227f8d11cf28c9999054afa2d63b83ef38b3d (diff)
downloadtranslated-content-fb129cca2082cbc57f93025a2e46797e5fb4a0f3.tar.gz
translated-content-fb129cca2082cbc57f93025a2e46797e5fb4a0f3.tar.bz2
translated-content-fb129cca2082cbc57f93025a2e46797e5fb4a0f3.zip
代入演算子の文書を更新
- 2021/07/21 時点の英語版に更新
Diffstat (limited to 'files/ja/web/javascript/reference/operators/division_assignment')
-rw-r--r--files/ja/web/javascript/reference/operators/division_assignment/index.md47
1 files changed, 18 insertions, 29 deletions
diff --git a/files/ja/web/javascript/reference/operators/division_assignment/index.md b/files/ja/web/javascript/reference/operators/division_assignment/index.md
index da51bf74c2..2ff001bc38 100644
--- a/files/ja/web/javascript/reference/operators/division_assignment/index.md
+++ b/files/ja/web/javascript/reference/operators/division_assignment/index.md
@@ -7,55 +7,44 @@ tags:
- 言語機能
- 演算子
- Reference
- - 代入演算子
- - 演算子
- - 言語機能
+browser-compat: javascript.operators.division_assignment
translation_of: Web/JavaScript/Reference/Operators/Division_assignment
---
{{jsSidebar("Operators")}}
-除算代入演算子 (`/=`) は変数を右オペランドの値で除算し、結果をその変数に代入するものです。
+除算代入演算子 (`/=`) は変数を右オペランドの値で除算し、結果をその変数に代入します。
{{EmbedInteractiveExample("pages/js/expressions-division-assignment.html")}}
-<div class="hidden">このデモのソースファイルは GitHub リポジトリーに格納されています。デモプロジェクトに協力したい場合は、 <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples</a> をクローンしてプルリクエストを送信してください。</div>
-
<h2 id="Syntax" name="Syntax">構文</h2>
-<pre class="syntaxbox notranslate"><strong>演算子:</strong> x /= y
-<strong>意味:</strong> x = x / y</pre>
+```js
+x /= y // x = x / y
+```
<h2 id="Examples" name="Examples">例</h2>
-<h3 id="Using_division_assignment" name="Using_division_assignment">除算代入の使用</h3>
+### 除算代入の使用
-<pre class="brush: js notranslate">// 以下の変数があると想定する
+```js
+// 以下の変数があり、すべての演算がこの順に実行されると想定する
// bar = 5
bar /= 2 // 2.5
+bar /= 2 // 1.25
+bar /= 0 // Infinity
bar /= 'foo' // NaN
-bar /= 0 // Infinity</pre>
+```
-<h2 id="Specifications" name="Specifications">仕様書</h2>
+## 仕様書
-<table class="standard-table">
- <tbody>
- <tr>
- <th scope="col">仕様書</th>
- </tr>
- <tr>
- <td>{{SpecName('ESDraft', '#sec-assignment-operators', 'Assignment operators')}}</td>
- </tr>
- </tbody>
-</table>
+{{Specifications}}
-<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの互換性</h2>
+## ブラウザーの互換性
-{{Compat("javascript.operators.division_assignment")}}
+{{Compat}}
-<h2 id="See_also" name="See_also">関連情報</h2>
+## 関連情報
-<ul>
- <li><a href="/ja/docs/Web/JavaScript/Guide/Expressions_and_Operators#Assignment">JavaScript ガイドの代入演算子</a></li>
- <li><a href="/ja/docs/Web/JavaScript/Reference/Operators/Division">除算演算子</a></li>
-</ul>
+- [JavaScript ガイドの代入演算子](/ja/docs/Web/JavaScript/Guide/Expressions_and_Operators#assignment)
+- [除算演算子](/ja/docs/Web/JavaScript/Reference/Operators/Division)