Skip to content

Commit 9a130ac

Browse files
printfinnleviding
andauthored
fix: 1-js/06-advanced-functions/05-global-object/ (#1072)
* Update article.md * Update 1-js/06-advanced-functions/05-global-object/article.md Co-authored-by: LeviDing <[email protected]> Co-authored-by: LeviDing <[email protected]>
1 parent d221e01 commit 9a130ac

File tree

1 file changed

+1
-1
lines changed
  • 1-js/06-advanced-functions/05-global-object

1 file changed

+1
-1
lines changed

1-js/06-advanced-functions/05-global-object/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var gVar = 5;
2525
alert(window.gVar); // 5(成为了全局对象的属性)
2626
```
2727

28-
具有与函数声明相同的效果(在主代码流中具有 `function` 关键字的语句,而不是函数表达式)。
28+
函数声明(特指在主代码流中具有 `function` 关键字的语句,而不是函数表达式)也有这样的效果
2929

3030
请不要依赖它!这种行为是出于兼容性而存在的。现代脚本使用 [JavaScript modules](info:modules) 所以不会发生这种事情。
3131

0 commit comments

Comments
 (0)