What’s the purpose of an asterisk (*) in ES6 generator functions
The three reasons were: Readability. A generator is quite different from a function, and the difference should be immediately visible (that is, without examining the whole implementation in search for a yield). Generality. It should be naturally possible to write generators that do not yield, and only return directly. Moreover, commenting out part of the … Read more