aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/eventloop
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/web/javascript/eventloop')
-rw-r--r--files/zh-cn/web/javascript/eventloop/index.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/files/zh-cn/web/javascript/eventloop/index.html b/files/zh-cn/web/javascript/eventloop/index.html
index f9fdf69207..bb8dd97448 100644
--- a/files/zh-cn/web/javascript/eventloop/index.html
+++ b/files/zh-cn/web/javascript/eventloop/index.html
@@ -77,7 +77,7 @@ console.log(bar(7)); // 返回 42</pre>
<p>下面的例子演示了这个概念(<code>setTimeout</code> 并不会在计时器到期之后直接执行):</p>
-<pre class="brush: js line-numbers language-js"><code class="language-js">const s = new Date().getSeconds();
+<pre class="brush: js line-numbers language-js">const s = new Date().getSeconds();
setTimeout(function() {
// 输出 "2",表示回调函数并没有在 500 毫秒之后立即执行
@@ -89,7 +89,7 @@ while(true) {
console.log("Good, looped for 2 seconds");
break;
}
-}</code></pre>
+}</pre>
<h3 id="零延迟">零延迟</h3>