Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardJavaScriptgenerator return throw protocolSingle-choice MCQ

Which is the output?

function* g(){try{yield 1}catch(e){yield "caught"}}\nconst it=g(); it.next(); console.log(it.throw("err").value);