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

Given this generator, what is the value property of the result returned by the third next() call?

function* g() { const a = yield 'first'; const b = yield a + 10; return b; } const it = g(); it.next(); // call 1 it.next(5); // call 2 it.next(100); // call 3 -> ?