Skip to content

Inheritance Patterns

In JavaScript, inheritance is achieved through prototypes, but several patterns have evolved to manage the inheritance of properties and methods efficiently. Each pattern solves specific problems, and understanding them helps in writing clean, maintainable, and performant code.

This document provides a conceptual overview of the five classical inheritance patterns. For complete code examples and step‑by‑step breakdowns.

PatternInstance PropertiesShared MethodsParent Constructor CallsEfficiency
Prototype ChainSharedYes1Medium
Constructor StealingOwn copyNo1Low
CombinationOwn copyYes2Medium
ParasiticOwn copy (via clone)No (recreated)0 (no constructor)Low
Parasitic CombinationOwn copyYes1High