commit
a61add9800
1 changed files with 4 additions and 4 deletions
|
@ -296,7 +296,7 @@ let counter2 = makeCounter();
|
||||||
alert( counter1() ); // 0
|
alert( counter1() ); // 0
|
||||||
alert( counter1() ); // 1
|
alert( counter1() ); // 1
|
||||||
|
|
||||||
alert( counter2() ); // 0 (independant)
|
alert( counter2() ); // 0 (independent)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
@ -567,7 +567,7 @@ Lexical Environment objects that we've been talking about are subjects to same m
|
||||||
return function() { alert(value); };
|
return function() { alert(value); };
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3 functions in array, every of them links to Lexical Environment
|
// 3 functions in array, every one of them links to Lexical Environment
|
||||||
// from the corresponding f() run
|
// from the corresponding f() run
|
||||||
// LE LE LE
|
// LE LE LE
|
||||||
let arr = [f(), f(), f()];
|
let arr = [f(), f(), f()];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue