diff options
Diffstat (limited to 'files/zh-cn/web/javascript/reference/statements/continue/index.html')
-rw-r--r-- | files/zh-cn/web/javascript/reference/statements/continue/index.html | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/files/zh-cn/web/javascript/reference/statements/continue/index.html b/files/zh-cn/web/javascript/reference/statements/continue/index.html index ce08e7f444..8d58c28a2b 100644 --- a/files/zh-cn/web/javascript/reference/statements/continue/index.html +++ b/files/zh-cn/web/javascript/reference/statements/continue/index.html @@ -43,7 +43,7 @@ translation_of: Web/JavaScript/Reference/Statements/continue <p>下述例子展示了一个在<code>i</code> 为 3时执行<code>continue</code> 语句的 {{jsxref("Statements/while", "while")}} 循环。因此,<code>n</code> 的值在几次迭代后分别为 1, 3, 7 和 12 .</p> -<pre class="brush: js language-js"><code class="language-js">i = 0; +<pre class="brush: js language-js">i = 0; n = 0; while (i < 5) { i++; @@ -51,7 +51,7 @@ while (i < 5) { continue; } n += i; -}</code></pre> +}</pre> <h3 id="使用带_label_的_continue">使用带 label 的 continue</h3> @@ -61,7 +61,7 @@ while (i < 5) { <p>参考 {{jsxref("Statements/label", "label")}} 。</p> -<pre class="brush: js language-js"><code class="language-js">var i = 0, +<pre class="brush: js language-js">var i = 0, j = 8; checkiandj: while (i < 4) { @@ -77,11 +77,11 @@ checkiandj: while (i < 4) { } console.log("i = " + i); console.log("j = " + j); -}</code></pre> +}</pre> <p>输出:</p> -<pre class="brush: js language-js"><code class="language-js">"i: 0" +<pre class="brush: js language-js">"i: 0" // start checkj "j: 8" @@ -105,7 +105,7 @@ checkiandj: while (i < 4) { "i: 3" "i = 4" -"j = 4"</code></pre> +"j = 4"</pre> <h2 id="规范">规范</h2> |