aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/reference/operators/await/index.html
diff options
context:
space:
mode:
authorIrvin <irvinfly@gmail.com>2022-02-16 02:02:49 +0800
committerIrvin <irvinfly@gmail.com>2022-02-16 02:35:54 +0800
commit01b0e12ba27b5069248fd09235e9a7143915ee30 (patch)
tree0e9edf538dc3fa3331e1dbb79239b58186765f86 /files/zh-cn/web/javascript/reference/operators/await/index.html
parent6ca84f1794af830ada9736d7289ce29aabb04ca3 (diff)
downloadtranslated-content-01b0e12ba27b5069248fd09235e9a7143915ee30.tar.gz
translated-content-01b0e12ba27b5069248fd09235e9a7143915ee30.tar.bz2
translated-content-01b0e12ba27b5069248fd09235e9a7143915ee30.zip
remove `notranslate` class in zh-CN
Diffstat (limited to 'files/zh-cn/web/javascript/reference/operators/await/index.html')
-rw-r--r--files/zh-cn/web/javascript/reference/operators/await/index.html8
1 files changed, 4 insertions, 4 deletions
diff --git a/files/zh-cn/web/javascript/reference/operators/await/index.html b/files/zh-cn/web/javascript/reference/operators/await/index.html
index 0183f4d7ae..8b07b23e41 100644
--- a/files/zh-cn/web/javascript/reference/operators/await/index.html
+++ b/files/zh-cn/web/javascript/reference/operators/await/index.html
@@ -15,7 +15,7 @@ translation_of: Web/JavaScript/Reference/Operators/await
<h2 id="语法">语法</h2>
-<pre class="syntaxbox notranslate">[返回值] = await 表达式;</pre>
+<pre class="syntaxbox">[返回值] = await 表达式;</pre>
<dl>
<dt>表达式</dt>
@@ -38,7 +38,7 @@ translation_of: Web/JavaScript/Reference/Operators/await
<p>如果一个 Promise 被传递给一个 await 操作符,await 将等待 Promise 正常处理完成并返回其处理结果。</p>
-<pre class="brush: js notranslate">function resolveAfter2Seconds(x) {
+<pre class="brush: js">function resolveAfter2Seconds(x) {
return new Promise(resolve =&gt; {
setTimeout(() =&gt; {
resolve(x);
@@ -56,7 +56,7 @@ f1();
<p>如果该值不是一个 Promise,await 会把该值转换为已正常处理的Promise,然后等待其处理结果。</p>
-<pre class="brush: js notranslate">async function f2() {
+<pre class="brush: js">async function f2() {
var y = await 20;
console.log(y); // 20
}
@@ -65,7 +65,7 @@ f2();
<p>如果 Promise 处理异常,则异常值被抛出。</p>
-<pre class="brush: js notranslate">async function f3() {
+<pre class="brush: js">async function f3() {
try {
var z = await Promise.reject(30);
} catch (e) {