The Prototype Chain

Every ordinary JavaScript object has an internal [[Prototype]] link, which can point to another object or null. When a property is not found directly on an object, JavaScript searches its prototype, then that prototype's prototype, and so on.

This delegation chain is JavaScript's fundamental inheritance mechanism. Class syntax is built on top of this system.

Prototype Lookup
Key Takeaways
  • Prototype lookup is property delegation.
  • The chain ends at null.
  • Class syntax ultimately relies on prototypes.
Knowledge Check

What happens when a property is not found directly on an object?