← Back to archive

Stdle #142 · scope · 2026-10-20

What does this JavaScript snippet output?

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

const obj = {
v: 7,
outer() {
const inner = () => () => this.v;
return inner()();
}
};
console.log(obj.outer());
Scope
4 attempts left

Answer & explanation