The idea of generators is tempting, and it tends to spoil us. We are no longer afraid to work with large or infinite sequences and streams. However, while generators are great at working with values, they were never designed for working with promises.
In this chapter, we will see yet another reconciliation—one that merges the syntax of generators with async and await, to give us asynchronous generators, and iterators.
The Impedance Mismatch Between Generators/Iterators and Asynchronous Operations
ES6 introduced us to iterables, the well-known symbol Symbol.iterator ...