mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-24 10:22:23 +00:00
docs(set): fix #991
This commit is contained in:
parent
55cbbb8da9
commit
323e9620a7
@ -225,7 +225,7 @@ f().then(v => console.log(v))
|
||||
|
||||
上面代码中,`await`命令的参数是数值`123`,这时等同于`return 123`。
|
||||
|
||||
另一种情况是,`await`命令后面是一个`thenable`对象(即定义`then`方法的对象),那么`await`会将其等同于 Promise 对象。
|
||||
另一种情况是,`await`命令后面是一个`thenable`对象(即定义了`then`方法的对象),那么`await`会将其等同于 Promise 对象。
|
||||
|
||||
```javascript
|
||||
class Sleep {
|
||||
|
@ -281,7 +281,7 @@ let union = new Set([...a, ...b]);
|
||||
let intersect = new Set([...a].filter(x => b.has(x)));
|
||||
// set {2, 3}
|
||||
|
||||
// 差集
|
||||
// (a 相对于 b 的)差集
|
||||
let difference = new Set([...a].filter(x => !b.has(x)));
|
||||
// Set {1}
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user