Skip to content

Commit 1c75bc7

Browse files
Merge branch 'master' of github.com:AlbertoMontalesi/JavaScript-es6-and-beyond-ebook
2 parents 8546def + fbe7d0d commit 1c75bc7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ebook/14_generators.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ fruitGenerator.next();
6262
fruitGenerator.next();
6363
// Object { value: "I like to eat Apple", done: false }
6464
fruitGenerator.next().value;
65-
// "I like to eat Melon"
65+
// "I like to eat Orange"
6666
```
6767

6868
- Our new generator will loop over the array and print one value at a time every time we call `.next()`.
@@ -152,4 +152,4 @@ asyncFunc.next();
152152
// Object { value: "our value is... 2", done: false }
153153
```
154154

155-
The first time we call `.next()` it will call our promise and wait for it to resolve( in our simple example it resolves immediately) and when we call `.next()` again it will utilize the value returned by the promise to do something else(in this case just interpolate a string).
155+
The first time we call `.next()` it will call our promise and wait for it to resolve( in our simple example it resolves immediately) and when we call `.next()` again it will utilize the value returned by the promise to do something else(in this case just interpolate a string).

0 commit comments

Comments
 (0)