aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/javascript/reference/operators/logical_and_assignment
diff options
context:
space:
mode:
Diffstat (limited to 'files/ja/web/javascript/reference/operators/logical_and_assignment')
-rw-r--r--files/ja/web/javascript/reference/operators/logical_and_assignment/index.md (renamed from files/ja/web/javascript/reference/operators/logical_and_assignment/index.html)30
1 files changed, 15 insertions, 15 deletions
diff --git a/files/ja/web/javascript/reference/operators/logical_and_assignment/index.html b/files/ja/web/javascript/reference/operators/logical_and_assignment/index.md
index 95ac42b650..fdca0cecc5 100644
--- a/files/ja/web/javascript/reference/operators/logical_and_assignment/index.html
+++ b/files/ja/web/javascript/reference/operators/logical_and_assignment/index.md
@@ -3,21 +3,21 @@ title: 論理積代入 (&&=)
slug: Web/JavaScript/Reference/Operators/Logical_AND_assignment
tags:
- JavaScript
- - Language feature
+ - 言語機能
- Logical assignment
- - Operator
+ - 演算子
- Reference
translation_of: Web/JavaScript/Reference/Operators/Logical_AND_assignment
---
-<div>{{jsSidebar("Operators")}}</div>
+{{jsSidebar("Operators")}}
-<p>論理積代入 (<code>x &amp;&amp;= y</code>) 演算子は、<code>x</code> が {{Glossary("truthy")}} である場合にのみ代入します。</p>
+論理積代入 (`x &amp;&amp;= y`) 演算子は、`x` が {{Glossary("truthy")}} である場合にのみ代入します。
-<div>{{EmbedInteractiveExample("pages/js/expressions-logical-and-assignment.html")}}</div>
+{{EmbedInteractiveExample("pages/js/expressions-logical-and-assignment.html")}}
<div class="hidden">The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples</a> and send us a pull request.</div>
-<h2 id="構文">構文</h2>
+## 構文
<pre class="syntaxbox notranslate"><em>expr1</em> &amp;&amp;= <em>expr2</em>
</pre>
@@ -26,22 +26,22 @@ translation_of: Web/JavaScript/Reference/Operators/Logical_AND_assignment
<h3 id="短絡評価(ショートサーキット)">短絡評価(ショートサーキット)</h3>
-<p><a href="/ja/docs/Web/JavaScript/Reference/Operators/Logical_AND">論理積演算子</a>は左から右に評価され、次のルールを使って短絡評価の可能性があるかどうかテストされます。</p>
+<a href="/ja/docs/Web/JavaScript/Reference/Operators/Logical_AND">論理積演算子</a>は左から右に評価され、次のルールを使って短絡評価の可能性があるかどうかテストされます。
-<p><code>(偽値の式) &amp;&amp; expr</code> は、偽値の式が短絡評価されます。</p>
+`(偽値の式) &amp;&amp; expr` は、偽値の式が短絡評価されます。
-<p>短絡評価とは、上記の <code><em>expr</em></code> 部分が<strong>評価されない</strong>ことを意味します。したがって、評価された場合の副作用は発生しません。(例えば、<code><em>expr</em></code> が関数呼び出しである場合、呼び出しは行われません。)</p>
+短絡評価とは、上記の `<em>expr</em>` 部分が<strong>評価されない</strong>ことを意味します。したがって、評価された場合の副作用は発生しません。(例えば、`<em>expr</em>` が関数呼び出しである場合、呼び出しは行われません。)
-<p>論理積代入も短絡評価されます。これは、<code>x &amp;&amp;= y</code> が以下と等価であることを意味します。</p>
+論理積代入も短絡評価されます。これは、`x &amp;&amp;= y` が以下と等価であることを意味します。
<pre class="brush: js notranslate">x &amp;&amp; (x = y);</pre>
-<p>そして、常に代入が行われる以下と等価ではありません。</p>
+そして、常に代入が行われる以下と等価ではありません。
<pre class="brush: js notranslate example-bad">x = x &amp;&amp; y;
</pre>
-<h2 id="例">例</h2>
+## 例
<h3 id="論理積代入演算子の使用">論理積代入演算子の使用</h3>
@@ -75,14 +75,14 @@ y &amp;&amp;= 0; // 0
-<p>{{Compat("javascript.operators.logical_and_assignment")}}</p>
+{{Compat("javascript.operators.logical_and_assignment")}}
<h2 id="関連情報">関連情報</h2>
<ul>
<li><a href="/ja/docs/Web/JavaScript/Reference/Operators/Logical_AND">論理積 (&amp;&amp;)</a></li>
- <li><a href="/ja/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing_operator">Null合体 (<code>??</code>)</a></li>
- <li><a href="/ja/docs/Web/JavaScript/Reference/Operators/Bitwise_AND_assignment">ビット論理積代入 (<code>&amp;=</code>)</a></li>
+ <li><a href="/ja/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing_operator">Null合体 (`??`)</a></li>
+ <li><a href="/ja/docs/Web/JavaScript/Reference/Operators/Bitwise_AND_assignment">ビット論理積代入 (`&amp;=`)</a></li>
<li>{{jsxref("Boolean")}}</li>
<li>{{Glossary("Truthy")}}</li>
<li>{{Glossary("Falsy")}}</li>