← Back to archive

Stdle #155 · async · 2026-11-02

What does this JavaScript snippet output?

A past puzzle — fully playable. 4 attempts, hints on wrong guesses.

function* g() { yield 10; yield 20; yield 30; }
const [a, b] = g();
console.log(a + ',' + b);
Async
4 attempts left

Answer & explanation