Slide 17
Slide 17 text
Environments
function f(x) {
var foo;
function g(y, z) {
var bar;
}
g(7, 1);
}
f(2);
2
1
0 …
f
…
g
undefined
foo
2
x
outer
Lexical environments
Execution contexts
undefined
bar
1
z
7
y
outer
Dr. Axel Rauschmayer (2ality.com) JavaScript’s variables 2014-03-30 17 / 32