What are JS Generators?
What are JS Generators?
Generators are a feature in Javascript which are basically functions that are kind of like iterators.
Creating
You can create generators like this:
function* myGenerator() {}
The * after function is required.
Yielding
The cor...
h.shadowtime2000.com2 min read
Todd
a11y ho, web development votary, musician
I've been curious for some time now about generators. They seem incredibly powerful; yet I've never used them IRL. What are some real-world use cases for generators?