Skip to content

MediumConceptAdvanced JavaScript

What is a generator function and where is it useful?

What a good answer covers

A function declared with function* that can pause at yield and resume, returning an iterator. It suits lazy sequences, custom iteration and, historically, coroutine-style async flows.

More on Advanced JavaScript

Flashcards for this topic