Skip to content

Commit 48f55f8

Browse files
committed
edit docs/object
2 parents 638b4ce + 1cc1735 commit 48f55f8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
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

docs/object.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ target // {a:1, b:2, c:3}
3636

3737
var target = { a: 1, b: 1 };
3838

39-
var source1 = { b: 2 };
39+
var source1 = { b: 2, c: 2 };
4040
var source2 = { c: 3 };
4141

4242
Object.assign(target, source1, source2);

0 commit comments

Comments
 (0)