Update article.md
This commit is contained in:
parent
fe1c4a241f
commit
2bea6d7278
1 changed files with 1 additions and 1 deletions
|
@ -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.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue