
…e bold parts. For creating a generator function, we use function * syntax instead of just function. Any number of spaces can exist between the function keyword, the *, and the function name. Since it is just a function, you can use it anywhere that a function can be used i.e inside objects…