Wednesday, 23 January, 2019 UTC


When you need to generate a data set, a generator function is often the correct solution. A generator function is defined with `function*` and then you `yield` each result you want out of the function when you call it. Generators pair well with the `...` operator inside of Array because they serve as iterators which can be called until all their results are exhausted.