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: 1-js/06-advanced-functions/03-closure/article.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -184,8 +184,8 @@ sayHi(); // Pete
184
184
The execution flow of the code above:
185
185
186
186
1. The global Lexical Environment has `name: "John"`.
187
-
2. At the line `(*)` the global variable is changed, now it has `name: "Pete"`.
188
-
3. When the function `sayHi()`, is executed and takes `name` from outside. Here that's from the global Lexical Environment where it's already `"Pete"`.
187
+
2. At the line `(*)` the global variable is changed. Now it has `name: "Pete"`.
188
+
3. When the function `sayHi()` is executed it takes `name` from outside, the global Lexical Environment, where its value is already `"Pete"`.
189
189
190
190
191
191
```smart header="One call -- one Lexical Environment"
0 commit comments