diff options
author | Irvin <irvinfly@gmail.com> | 2022-02-16 02:14:18 +0800 |
---|---|---|
committer | Irvin <irvinfly@gmail.com> | 2022-02-16 02:35:54 +0800 |
commit | d44f5032d0f53256b2d5aef505d6b593fd3cd158 (patch) | |
tree | 4b585f4be9c9a2712664ad10e7acf62c83fff51f /files/zh-cn/web/javascript/reference/operators/comma_operator | |
parent | f45e9e070c93ebbd83d488bdd775987a4d75c201 (diff) | |
download | translated-content-d44f5032d0f53256b2d5aef505d6b593fd3cd158.tar.gz translated-content-d44f5032d0f53256b2d5aef505d6b593fd3cd158.tar.bz2 translated-content-d44f5032d0f53256b2d5aef505d6b593fd3cd158.zip |
fix yari h2m dry run errors (zh-CN)
Diffstat (limited to 'files/zh-cn/web/javascript/reference/operators/comma_operator')
-rw-r--r-- | files/zh-cn/web/javascript/reference/operators/comma_operator/index.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/files/zh-cn/web/javascript/reference/operators/comma_operator/index.html b/files/zh-cn/web/javascript/reference/operators/comma_operator/index.html index cc7b2f83a8..1c9ca88054 100644 --- a/files/zh-cn/web/javascript/reference/operators/comma_operator/index.html +++ b/files/zh-cn/web/javascript/reference/operators/comma_operator/index.html @@ -33,7 +33,7 @@ translation_of: Web/JavaScript/Reference/Operators/Comma_Operator <p>假设 <code>a</code> 是一个二维数组,每一维度包含10个元素,则下面的代码使用逗号操作符一次递增/递减两个变量。需要注意的是,<code>var</code> 语句中的逗号<em><strong>不是</strong></em>逗号操作符,因为它不是存在于一个表达式中。尽管从实际效果来看,那个逗号同逗号运算符的表现很相似。但确切地说,它是 <code>var</code> 语句中的一个特殊符号,用于把多个变量声明结合成一个。下面的代码打印一个二维数组中斜线方向的元素:</p> -<pre class="brush:js;highlight:[1]">for (var i = 0, j = 9; i <= 9; i++, j--) +<pre class="brush:js">for (var i = 0, j = 9; i <= 9; i++, j--) document.writeln("a[" + i + "][" + j + "] = " + a[i][j]);</pre> <h3 id="处理后返回">处理后返回</h3> |