JavaScript Generator Complete Reference
JavaScript supports Generator functions and Generator Objects.
Generator-Function: A generator-function is defined as a normal function, but whenever it needs to generate a value, it does so with the yield keyword rather than return.
Generator-Object: Generator functions return a generator object. Generator objects are used either by calling the next method on the generator object or using the generator object in a “for of” loop.
The complete list of JavaScript Generator are listed below:
Instance methods