loading...

Discussion on: Understanding Generators in ES6 Javascript

Collapse
fpuffer profile image
Frank Puffer

Looking forward to your next post. What you have shown so far can be achieved much more easily with a simple array but I am sure there are better use cases for generators. I guess it gets more interesting when you don't know in advance how many values need to be generated.

Collapse
phung_cz profile image
Tuan Phung ⚡️ Author

I finally got some time, so I wrote down one example for the usage of generators, hope that you'll enjoy reading it 👉dev.to/phung_cz/canceling-promises...