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

edit promise

This commit is contained in:
ruanyf 2015-10-25 13:30:32 +08:00
parent 990f2106be
commit 1a9d77fd7b
2 changed files with 4 additions and 1 deletions

View File

@ -71,7 +71,7 @@ hw.next()
需要注意的是,`yield`语句后面的表达式,只有当调用`next`方法、内部指针指向该语句时才会执行因此等于为JavaScript提供了手动的“惰性求值”Lazy Evaluation的语法功能。
```javascript
function* gen{
function* gen() {
yield 123 + 456;
}
```

View File

@ -101,6 +101,9 @@ var getJSON = function(url) {
client.send();
function handler() {
if ( this.readyState !== 4 ) {
return;
}
if (this.status === 200) {
resolve(this.response);
} else {