yieldbeginnerfunction* gen() {
const x = yield 'ready?'
yield x * 2
}
const it = gen()
it.next() // β { value: 'ready?', done: false }
it.next(5) // β { value: 10, done: false }The yield expression pauses the generator and optionally receives a value passed to the next next() call.
Check that yield* delegates to another iterable.