Skip to content

Commit b744b68

Browse files
committed
Update desc for function scope in block scope.
1 parent 52386d1 commit b744b68

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/let.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ES6新增了let命令,用来声明变量。它的用法类似于var,但是
1111
var b = 1;
1212
}
1313

14-
a // ReferenceError: a is not defined.
14+
a // ReferenceError: a is not defined.
1515
b //1
1616

1717
```
@@ -102,10 +102,10 @@ function f1() {
102102
```javascript
103103

104104
// IIFE写法
105-
(function () {
105+
(function () {
106106
var tmp = ...;
107107
...
108-
}());
108+
}());
109109

110110
// 块级作用域写法
111111
{
@@ -115,7 +115,7 @@ function f1() {
115115

116116
```
117117

118-
另外,ES6也规定,函数的作用域为其所在的块级作用域
118+
另外,ES6也规定,函数本身的作用域,在其所在的块级作用域之内
119119

120120
```javascript
121121

0 commit comments

Comments
 (0)