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
+2 -2
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);