JavaScript Developer — Medium
Key points
- Generator functions are lazy; they do not execute immediately
- .next() method is used to control the execution of a generator function
- Calling a generator function returns an iterator object
- Yield statements are used to pause and resume execution
Ready to go further?
Related questions
