Skip to content

Commit 0c0f92e

Browse files
committed
Spelling
Edited some minor spelling errors.
1 parent fb04fe2 commit 0c0f92e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

1-js/06-advanced-functions/03-closure/article.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Different languages behave differently here, in this chapter we cover JavaScript
1515

1616
## A couple of questions
1717

18-
Let's formulate two questions for the seed, and then study internal mechanics piece-by-piece, so that you'll be able to answer these questions and more complex ones in the future.
18+
Let's formulate two questions for the seed, and then study the internal mechanics piece-by-piece, so that you'll be able to answer these questions and more complex ones in the future.
1919

2020
1. The function `sayHi` uses an external variable `name`. When the function runs, which value of these two it's going to use?
2121

@@ -176,7 +176,7 @@ sayHi(); // Pete
176176

177177
The execution flow of the code above:
178178

179-
1. The global Lexical Envrionment has `name: "John"`.
179+
1. The global Lexical Environment has `name: "John"`.
180180
2. At the line `(*)` the global variable is changed, now it has `name: "Pete"`.
181181
3. When the function `say()`, is executed and takes `name` from outside. Here that's from the global Lexical Environment where it's already `"Pete"`.
182182

@@ -565,7 +565,7 @@ Lexical Environment objects that we've been talking about are subjects to same m
565565
return function() { alert(value); };
566566
}
567567
568-
// 3 functions in array, every of them links to LexicalEnvrironment
568+
// 3 functions in array, every of them links to Lexical Environment
569569
// from the corresponding f() run
570570
// LE LE LE
571571
let arr = [f(), f(), f()];

0 commit comments

Comments
 (0)