nzakas / understandinges6

Content for the ebook "Understanding ECMAScript 6"
5.45k stars 796 forks source link

Incorrect output of an example in Chapter 8 #416

Closed Zack-Bee closed 6 years ago

Zack-Bee commented 6 years ago

Hello, i think there maybe a typo. you can see the incrorrect sentence before it. https://leanpub.com/understandinges6/read#leanpub-auto-task-running-with-data

With this implementation of run() , you can run a generator containing multiple yield statements, such as: run(function*() { console.log(1); yield; console.log(2); yield; console.log(3); }); This example just outputs three numbers to the console,

This example just outputs two numbers to the console, 1 and 2. When the second yield is executed, the done become true and the function run is complete.

Zack-Bee commented 6 years ago

Sorry, it's my fault