You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README-zh_CN.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -644,14 +644,14 @@ const sum = eval('10*10+5')
644
644
645
645
#### 答案: A
646
646
647
-
`eval`evaluates codes that's passed as a string. If it's an expression, like in this case, it evaluates the expression. The expression is `10 * 10 + 5`. This returns the number `105`.
With the `var`keyword, you can declare multiple variables with the same name. The variable will then hold the latest value.
698
+
使用 `var`关键字,你可以用相同的名称声明多个变量。然后变量将保存最新的值。
699
699
700
-
You cannot do this with `let`or`const`since they're block-scoped.
700
+
你不能使用 `let`或`const`来实现这一点,因为它们是块作用域的。
701
701
702
702
</p>
703
703
</details>
@@ -726,9 +726,9 @@ set.has(1)
726
726
727
727
#### 答案: C
728
728
729
-
All object keys (excluding Symbols) are strings under the hood, even if you don't type it yourself as a string. This is why `obj.hasOwnProperty('1')`also returns true.
It doesn't work that way for a set. There is no `'1'` in our set: `set.has('1')`returns`false`. It has the numeric type `1`, `set.has(1)`returns`true`.
0 commit comments