commit
b526e6bde5
1 changed files with 1 additions and 1 deletions
|
@ -74,7 +74,7 @@ sayHi();
|
||||||
alert(phrase); // Error: phrase is not defined
|
alert(phrase); // Error: phrase is not defined
|
||||||
```
|
```
|
||||||
|
|
||||||
As we can see, `var` pierces through `if`, `for` or other code blocks. That's because a long time ago in JavaScript blocks had no Lexical Environments. And `var` is a reminiscence of that.
|
As we can see, `var` pierces through `if`, `for` or other code blocks. That's because a long time ago in JavaScript blocks had no Lexical Environments. And `var` is a remnant of that.
|
||||||
|
|
||||||
## "var" are processed at the function start
|
## "var" are processed at the function start
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue