aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn
diff options
context:
space:
mode:
authorexprassL <49985254+exprassL@users.noreply.github.com>2021-12-21 21:46:11 +0800
committerGitHub <noreply@github.com>2021-12-21 21:46:11 +0800
commit2ef4244da710da85d3cf29472957acc504302a4c (patch)
tree903d51da48297722d06d4556dfff50cfc734fb77 /files/zh-cn
parent427dd0d68ecb7e43c394ffe232822e582c053d89 (diff)
downloadtranslated-content-2ef4244da710da85d3cf29472957acc504302a4c.tar.gz
translated-content-2ef4244da710da85d3cf29472957acc504302a4c.tar.bz2
translated-content-2ef4244da710da85d3cf29472957acc504302a4c.zip
”无效的 JavaScript 标识符作为属性名称“一节输出值有误 (#3290)
输出值应是 boolean true,不是字符串 "true"
Diffstat (limited to 'files/zh-cn')
-rw-r--r--files/zh-cn/web/javascript/reference/operators/destructuring_assignment/index.html2
1 files changed, 1 insertions, 1 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 4c6c4a4457..8d56764ac3 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
@@ -370,7 +370,7 @@ rest; // { c: 30, d: 40 }</pre>
<pre class="brush: js">const foo = { 'fizz-buzz': true };
const { 'fizz-buzz': fizzBuzz } = foo;
-console.log(fizzBuzz); // "true"
+console.log(fizzBuzz); // true
</pre>
<h3 id="解构对象时会查找原型链(如果属性不在对象自身,将从原型链中查找)">解构对象时会查找原型链(如果属性不在对象自身,将从原型链中查找)</h3>