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
@@ -759,7 +759,7 @@ If you have two keys with the same name, the key will be replaced. It will still
759
759
760
760
---
761
761
762
-
###### 26. The JavaScript global execution context creates two things for you: the global object, and the "this" keyword.
762
+
###### 26. JavaScript 全局执行上下文为你做了两件事:全局对象和 this 关键字。
763
763
764
764
- A: true
765
765
- B: false
@@ -770,7 +770,7 @@ If you have two keys with the same name, the key will be replaced. It will still
770
770
771
771
#### 答案: A
772
772
773
-
The base execution context is the global execution context: it's what's accessible everywhere in your code.
773
+
基本执行上下文是全局执行上下文:它是代码中随处可访问的内容。
774
774
775
775
</p>
776
776
</details>
@@ -796,7 +796,7 @@ for (let i = 1; i < 5; i++) {
796
796
797
797
#### 答案: C
798
798
799
-
The `continue` statement skips an iteration if a certain condition returns `true`.
799
+
如果某个条件返回 `true`,则 `continue` 语句跳过本次迭代。
800
800
801
801
</p>
802
802
</details>
@@ -825,7 +825,7 @@ name.giveLydiaPizza()
825
825
826
826
#### 答案: A
827
827
828
-
`String`is a built-in constructor, which we can add properties to. I just added a method to its prototype. Primitive strings are automatically converted into a string object, generated by the string prototype function. So, all strings (string objects) have access to that method!
However, when we stringify an object, it becomes `"[Object object]"`. So what we are saying here, is that `a["Object object"] = 123`. Then, we can try to do the same again. `c`is another object that we are implicitly stringifying. So then, `a["Object object"] = 456`.
We have a `setTimeout`function and invoked it first. Yet, it was logged last.
891
+
我们有一个 `setTimeout`函数,并首先调用它。然而,它是最后打印的。
892
892
893
-
This is because in browsers, we don't just have the runtime engine, we also have something called a `WebAPI`. The `WebAPI`gives us the `setTimeout`function to start with, and for example the DOM.
This is where an event loop starts to work. An **event loop** looks at the stack and task queue. If the stack is empty, it takes the first thing on the queue and pushes it onto the stack.
0 commit comments