Skip to content

Commit 9f099db

Browse files
Update solution.md
1 parent 0f5b63d commit 9f099db

File tree

1 file changed

+1
-1
lines changed
  • 1-js/06-advanced-functions/03-closure/10-make-army

1 file changed

+1
-1
lines changed

1-js/06-advanced-functions/03-closure/10-make-army/solution.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function makeArmy() {
5151
}
5252
```
5353

54-
we can see that it lives in the lexical environment associated with the current `makeArmy()` run. But when `army[5]()` is called, `makeArmy` has already finished its job, and the final value of `i` is `10` (at the end of `while`).
54+
We can see that it lives in the lexical environment associated with the current `makeArmy()` run. But when `army[5]()` is called, `makeArmy` has already finished its job, and the final value of `i` is `10` (at the end of `while`).
5555

5656
As a result, all `shooter` functions get the same value from the outer lexical environment and that is, the last value, `i=10`.
5757

0 commit comments

Comments
 (0)