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

Which is the output?

function* g(){yield "a"; yield "b"}\nlet s=""; for(const v of g())s+=v; console.log(s);