MCQs > IT & Programming > JavaScript > What's the output? function testGenerator() { yield 'first'; document.write('step1'); yield 'second'; document.write('step2'); yield 'third'; document.write('step3'); } var g = testGenerator(); document.write(g.next()); document.write(g.next());

JavaScript MCQs

What will be output of the following code? function testGenerator() { yield "first"; document.write("step1"); yield "second"; document.write("step2"); yield "third"; document.write("step3"); } var g = testGenerator(); document.write(g.next()); document.write(g.next());

Answer

Correct Answer: firststep1second

Explanation:

Note: This Question is unanswered, help us to find answer for this one

JavaScript Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

JavaScript Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it