From b0c60e3b29eb40eef8c8f4db964bb445f5990ff0 Mon Sep 17 00:00:00 2001 From: Vse Mozhe Buty Date: Tue, 20 Oct 2020 23:22:00 +0300 Subject: [PATCH] Remove possibly outdated comment Currently, the error is alerted and the console is empty (at least in Chrome). --- 1-js/06-advanced-functions/04-var/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/06-advanced-functions/04-var/article.md b/1-js/06-advanced-functions/04-var/article.md index b2559989..1d01843a 100644 --- a/1-js/06-advanced-functions/04-var/article.md +++ b/1-js/06-advanced-functions/04-var/article.md @@ -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.