Iterate over JavaScript (ES6) generators

Share this video with your friends

Send Tweet

Generators are iterables, meaning we can easily iterate over the yielded values with a for-of loop. This video demonstrates this based on a simple counter example.