aboutsummaryrefslogtreecommitdiff
path: root/files/zh-tw/web/javascript/reference/operators/comma_operator
diff options
context:
space:
mode:
authort7yang <t7yang@gmail.com>2022-01-10 08:38:08 +0800
committerIrvin <irvinfly@gmail.com>2022-02-16 02:35:54 +0800
commitf45e9e070c93ebbd83d488bdd775987a4d75c201 (patch)
treeaacef5edaf768a188cadc46860f5b6aaa74f39ef /files/zh-tw/web/javascript/reference/operators/comma_operator
parent8ccfa93045a6c119303566370999f59a0aae3b25 (diff)
downloadtranslated-content-f45e9e070c93ebbd83d488bdd775987a4d75c201.tar.gz
translated-content-f45e9e070c93ebbd83d488bdd775987a4d75c201.tar.bz2
translated-content-f45e9e070c93ebbd83d488bdd775987a4d75c201.zip
fix yari h2m dry run errors
Diffstat (limited to 'files/zh-tw/web/javascript/reference/operators/comma_operator')
-rw-r--r--files/zh-tw/web/javascript/reference/operators/comma_operator/index.html82
1 files changed, 3 insertions, 79 deletions
diff --git a/files/zh-tw/web/javascript/reference/operators/comma_operator/index.html b/files/zh-tw/web/javascript/reference/operators/comma_operator/index.html
index e1c45ea5b0..f48dc17505 100644
--- a/files/zh-tw/web/javascript/reference/operators/comma_operator/index.html
+++ b/files/zh-tw/web/javascript/reference/operators/comma_operator/index.html
@@ -28,7 +28,7 @@ translation_of: Web/JavaScript/Reference/Operators/Comma_Operator
<p>The following code prints the values of the diagonal elements in the array:</p>
-<pre class="brush:js;highlight:[1]">for (var i = 0, j = 9; i &lt;= 9; i++, j--)
+<pre class="brush:js">for (var i = 0, j = 9; i &lt;= 9; i++, j--)
console.log("a[" + i + "][" + j + "] = " + a[i][j]);</pre>
<p>Note that the comma in assignments such as the <code>var</code> statement may appear not to have the normal effect of comma operators because they don't exist within an expression. In the following example, <code>a</code> is set to the value of <code>b = 3</code> (which is 3), but the <code>c = 4</code> expression still evaluates and its result returned to console (i.e., 4). This is due to <a href="/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence">operator precedence and associativity</a>.</p>
@@ -56,87 +56,11 @@ console.log(x); // 6 (right-most)
<h2 id="規範">規範</h2>
-<table class="standard-table">
- <tbody>
- <tr>
- <th scope="col">Specification</th>
- <th scope="col">Status</th>
- <th scope="col">Comment</th>
- </tr>
- <tr>
- <td>{{SpecName('ESDraft', '#sec-comma-operator', 'Comma operator')}}</td>
- <td>{{Spec2('ESDraft')}}</td>
- <td> </td>
- </tr>
- <tr>
- <td>{{SpecName('ES6', '#sec-comma-operator', 'Comma operator')}}</td>
- <td>{{Spec2('ES6')}}</td>
- <td> </td>
- </tr>
- <tr>
- <td>{{SpecName('ES5.1', '#sec-11.14', 'Comma operator')}}</td>
- <td>{{Spec2('ES5.1')}}</td>
- <td> </td>
- </tr>
- <tr>
- <td>{{SpecName('ES1', '#sec-11.14', 'Comma operator')}}</td>
- <td>{{Spec2('ES1')}}</td>
- <td>Initial definition</td>
- </tr>
- </tbody>
-</table>
+{{Specifications}}
<h2 id="瀏覽器相容性">瀏覽器相容性</h2>
-<p>{{CompatibilityTable}}</p>
-
-<div>
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Chrome</th>
- <th>Firefox (Gecko)</th>
- <th>Internet Explorer</th>
- <th>Opera</th>
- <th>Safari</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>3.0</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<div>
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Android</th>
- <th>Chrome for Android</th>
- <th>Firefox Mobile (Gecko)</th>
- <th>IE Mobile</th>
- <th>Opera Mobile</th>
- <th>Safari Mobile</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- </tr>
- </tbody>
-</table>
-</div>
+{{Compat}}
<h2 id="參見">參見</h2>