1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-24 18:32:22 +00:00

docs(set): fix #991

This commit is contained in:
ruanyf 2020-05-31 20:17:06 +08:00
parent 55cbbb8da9
commit 323e9620a7
2 changed files with 2 additions and 2 deletions

View File

@ -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 {

View File

@ -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}
```