Pass Values between a Generator's `next` and `yield`

InstructorJohn Lindquist

Share this video with your friends

Send Tweet

With a solid understanding of how generators iterate then pause at a yield, we can now pass values into the next method and receive them where the generator paused then continue to the next iteration.

JL decentraliser
~ 5 years ago

createReverseIterator is not used by the function in this example