JavaScript Generators Explained, But On A Senior-Level

August 30, 2024

Generators are most commonly seen in sagas, but there are more use cases for them. You’re going to see some of them in this article.

The short answer to the question “What is a generator?” is:

Generators are pull streams in JavaScript.

Let’s dissect this definition and then jump into some examples.

First, you need to understand two terms: “pull” and “stream”.

Source: JavaScript Generators Explained, But On A Senior-Level

We’ve covered generator functions several times over the years on Conffab, most recently James Sinclair at Web Directions Summit in 2024.

But, there are several talks you can watch here with a free account.