← Back to archive

Stdle #136 · scope · 2026-10-14

What does this JavaScript snippet output?

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

class C {
static count = 0;
static inc() { this.count++; return this.count; }
}
console.log(C.inc(), C.inc());
Scope
4 attempts left

Answer & explanation