Classes & Objects
classes
Question Banks
JavaScript Class, Generator, and Strict-Mode Traces
Four advanced traces covering generator iterator state, the `_id` private-by-convention pattern, strict mode + `Object.defineProperty` enumerability, and try/catch + `var` scope leaks.
Prototype Chain and Inheritance Quiz
Practice the prototype-chain mechanics: extending built-ins, defining shared properties on `Object.prototype`, and traversing the chain via `Object.getPrototypeOf`.
JavaScript Class Static vs Instance: Two Explanations Quiz
Two seeded explanations of how a `Person` class with a static method, a getter, and an instance method behaves when called via `new`, plus two companions on getter syntax and static field inheritance.
Community
The this Keyword: Six Rules and the Edge Cases
The six rules that fully decide the value of this in JavaScript: lexical for arrows, new, explicit binding, implicit binding, and the strict/sloppy default. Plus the four-step diagnostic I use on every this bug.
Prototypes vs Classes: What Is Actually Happening
The contrarian take that classes are no longer just syntactic sugar over prototypes. Walks the prototype chain, what new actually does, and the five things class adds that pure-prototype code cannot replicate without contortion.
