Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ae72328

Browse files
authored
Merge pull request #2222 from vsemozhetbyt/patch-11
Remove possibly outdated comment
2 parents 971a32e + b0c60e3 commit ae72328

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎1-js/06-advanced-functions/04-var/article.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ function sayHi() {
8282
}
8383

8484
sayHi();
85-
alert(phrase); // Error: phrase is not defined (Check the Developer Console)
85+
alert(phrase); // Error: phrase is not defined
8686
```
8787

8888
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.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /