When should we use generators in ES6?
Loading
When should we use generators in ES6?
Generator functions provide a powerful alternative: they allow you to define an iterative algorithm by writing a single function whose execution is not continuous. Generator functions are written using the function* syntax. When called, generator functions do not initially execute their code.
You can also see this link for help-