Generator in JavaScript

In ECMA2015 generators are introduced in javascript. Functions in Javascript run until return or end. Generators run until yield or return or end. Generator is a process that can be passed and resumed and can yield multiple values. It provides a new way of working with functions and iterators. Using a generator: Regular function return …

Generator in JavaScript Read More »