Skip to main content

Guess the Output · #35 · 2026-05-09

What does this print?

JavaScript ·Difficulty 1/3

How to play

Read the code snippet and pick the correct output from four choices. One shot — no take-backs. Press 1–4 or click to answer.

function* gen() {
  yield 1;
  yield 2;
}
const g = gen();
console.log(g.next().value, g.next().value);

Loading your progress...

Press 1 through 4, or tap a numbered choice, to answer. Back to hub