Remove possibly outdated comment
Currently, the error is alerted and the console is empty (at least in Chrome).
This commit is contained in:
parent
971a32e114
commit
b0c60e3b29
1 changed files with 1 additions and 1 deletions
|
@ -82,7 +82,7 @@ function sayHi() {
|
|||
}
|
||||
|
||||
sayHi();
|
||||
alert(phrase); // Error: phrase is not defined (Check the Developer Console)
|
||||
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 remnant of that.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue