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

Merge branch 'gh-pages' of github.com:ruanyf/es6tutorial into gh-pages

This commit is contained in:
ruanyf 2016-06-30 17:09:18 +08:00
commit c25565b70c

View File

@ -98,7 +98,7 @@ Promise 的最大问题是代码冗余原来的任务被Promise 包装了一
举例来说,读取文件的协程写法如下。
```javascript
function *asnycJob() {
function *asyncJob() {
// ...其他代码
var f = yield readFile(fileA);
// ...其他代码
@ -1171,7 +1171,7 @@ function chainAnimationsPromise(elem, animations) {
var p = Promise.resolve();
// 使用then方法添加所有动画
for(var anim in animations) {
for(var anim of animations) {
p = p.then(function(val) {
ret = val;
return anim(elem);