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

What does the snippet print?

function* g(){yield "a"; yield "b"}\nconsole.log(g().next().value);