← Back to archive

Stdle #95 · scope · 2026-09-03

What does this JavaScript snippet output?

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

function counter(start) {
return function () { return start++; };
}
const c = counter(10);
console.log(c(), c(), c());
Scope
4 attempts left

Answer & explanation