Created
March 1, 2018 15:39
-
-
Save vldvel/c64fdeb9cc68df828c4643a8abccd855 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function * anotherGenerator(i) { | |
| yield i + 1; | |
| yield i + 2; | |
| yield i + 3; | |
| } | |
| function * generator(i) { | |
| yield* anotherGenerator(i); | |
| } | |
| var gen = generator(1); | |
| gen.next().value; // 2 | |
| gen.next().value; // 3 | |
| gen.next().value; // 4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment