Question from the Javascript test

How to declare a generator function in JavaScript?