← Back to archive

Stdle #180 · scope · 2026-11-27

What does this JavaScript snippet output?

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

const make = () => {
const store = [];
return v => { store.push(v); return store.length; };
};
const push = make();
console.log(push("a"), push("b"), push("c"));
Scope
4 attempts left

Answer & explanation