Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumJavaScriptgenerators and yieldSingle-choice MCQ

What is logged here, given how arguments to .next() are consumed?

function* gen() { const a = yield 1; const b = yield a + 1; console.log(a, b); } const g = gen(); g.next(10); g.next(20); g.next(30);