JavaScript Generators
Generator functions , allow you to define a function
whose execution is not continuous. Generator functions
are written using the function*
syntax.
Generator function do not initially execute their code.
Instead they return a special type of iterator called
a Generator. When a value is consumed by calling the
generators next
method, then function executes until
it encounters yield
keyword.
References:
Categories :
JavaScript
ES6