Update article.md
A minor addition. (...where such thing doesn't happen. --> where such a thing doesn't happen.)
This commit is contained in:
parent
97ef86242f
commit
96e95bb3d1
1 changed files with 1 additions and 1 deletions
|
@ -27,7 +27,7 @@ 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).
|
||||
|
||||
Please don't rely on that! This behavior exists for compatibility reasons. Modern scripts use [JavaScript modules](info:modules) where such thing doesn't happen.
|
||||
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.
|
||||
|
||||
If we used `let` instead, such thing wouldn't happen:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue