1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-28 04:42:21 +00:00

Merge pull request #498 from liujunyang/generator-async-suggestion

修改Generator函数为习惯写法
This commit is contained in:
Ruan YiFeng 2017-09-13 17:09:46 +08:00 committed by GitHub
commit ff02ddb09b

View File

@ -102,7 +102,7 @@ Promise 的最大问题是代码冗余,原来的任务被 Promise 包装了一
举例来说,读取文件的协程写法如下。
```javascript
function *asyncJob() {
function* asyncJob() {
// ...其他代码
var f = yield readFile(fileA);
// ...其他代码