From 2bea6d72789ace68e18407c7ea7fc01d39f1472c Mon Sep 17 00:00:00 2001 From: Gao Fang <10386624+printfinn@users.noreply.github.com> Date: Fri, 1 Jul 2022 13:42:48 +0800 Subject: [PATCH] Update article.md --- 1-js/06-advanced-functions/05-global-object/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/06-advanced-functions/05-global-object/article.md b/1-js/06-advanced-functions/05-global-object/article.md index 40131e33..cf4839d9 100644 --- a/1-js/06-advanced-functions/05-global-object/article.md +++ b/1-js/06-advanced-functions/05-global-object/article.md @@ -25,7 +25,7 @@ var gVar = 5; alert(window.gVar); // 5 (became a property of the global object) ``` -The same effect have function declarations (statements with `function` keyword in the main code flow, not function expressions). +Function declarations have the same effect (statements with `function` keyword in the main code flow, not function expressions). Please don't rely on that! This behavior exists for compatibility reasons. Modern scripts use [JavaScript modules](info:modules) where such a thing doesn't happen.