aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/reference/operators/destructuring_assignment/index.html
diff options
context:
space:
mode:
authorIrvin <irvinfly@gmail.com>2022-02-16 02:14:18 +0800
committerIrvin <irvinfly@gmail.com>2022-02-16 02:35:54 +0800
commitd44f5032d0f53256b2d5aef505d6b593fd3cd158 (patch)
tree4b585f4be9c9a2712664ad10e7acf62c83fff51f /files/zh-cn/web/javascript/reference/operators/destructuring_assignment/index.html
parentf45e9e070c93ebbd83d488bdd775987a4d75c201 (diff)
downloadtranslated-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/destructuring_assignment/index.html')
-rw-r--r--files/zh-cn/web/javascript/reference/operators/destructuring_assignment/index.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/files/zh-cn/web/javascript/reference/operators/destructuring_assignment/index.html b/files/zh-cn/web/javascript/reference/operators/destructuring_assignment/index.html
index 93182a3253..05cc98f3a9 100644
--- a/files/zh-cn/web/javascript/reference/operators/destructuring_assignment/index.html
+++ b/files/zh-cn/web/javascript/reference/operators/destructuring_assignment/index.html
@@ -188,7 +188,7 @@ console.log(q); // true
</pre>
<div class="note">
-<p><strong>注意</strong>:赋值语句周围的圆括号 <code>( ... )</code> 在使用对象字面量无声明解构赋值时是必须的。</p>
+<p><strong>备注:</strong>赋值语句周围的圆括号 <code>( ... )</code> 在使用对象字面量无声明解构赋值时是必须的。</p>
<p><code>{a, b} = {a: 1, b: 2}</code> 不是有效的独立语法,因为左边的 <code>{a, b}</code> 被认为是一个块而不是对象字面量。</p>
@@ -259,7 +259,7 @@ drawES2015Chart({
});</pre>
<div class="note">
-<p>在上面的 <strong><code>drawES2015Chart</code></strong> 的函数签名中,解构的左手边被分配给右手边的空对象字面值:<code>{size = 'big', cords = {x: 0, y: 0}, radius = 25} = {}</code>。你也可以在没有右侧分配的情况下编写函数。但是,如果你忽略了右边的赋值,那么函数会在被调用的时候查找至少一个被提供的参数,而在当前的形式下,你可以直接调用 <code><strong>drawES2015Chart()</strong></code> 而不提供任何参数。如果你希望能够在不提供任何参数的情况下调用该函数,则当前的设计非常有用,而另一种方法在您确保将对象传递给函数时非常有用。</p>
+<p><strong>备注:</strong>在上面的 <strong><code>drawES2015Chart</code></strong> 的函数签名中,解构的左手边被分配给右手边的空对象字面值:<code>{size = 'big', cords = {x: 0, y: 0}, radius = 25} = {}</code>。你也可以在没有右侧分配的情况下编写函数。但是,如果你忽略了右边的赋值,那么函数会在被调用的时候查找至少一个被提供的参数,而在当前的形式下,你可以直接调用 <code><strong>drawES2015Chart()</strong></code> 而不提供任何参数。如果你希望能够在不提供任何参数的情况下调用该函数,则当前的设计非常有用,而另一种方法在您确保将对象传递给函数时非常有用。</p>
</div>
<h3 id="解构嵌套对象和数组">解构嵌套对象和数组</h3>