Course lesson

Make JavaScript computations lazy using Iterator Helpers

You no longer need to write generator functions to create basic lazy iterator functions.

Duration
6 min
Access
Free
Transcript
Retained from source evidence

You no longer need to write generator functions to create basic lazy iterator functions.

Now, ECMAScript supports iterator helpers that you can call on Array.values(). With these helpers, the values of an array will be operated on lazily, and will only run when the values are needed.