Prototype-based object orientation
Prototype-based object orientation is an object model in which objects obtain properties or behavior through links to other objects called prototypes.
The Joy of JavaScript
An inheritance style in which an object delegates property and method lookup to objects linked in its prototype chain.
- How it is used
- Models reusable object behavior through prototype links in JavaScript domain objects.
- How deep it goes
- Works through Object.create, prototype inspection, and implicit property lookup, while contrasting linking with copied properties.
- Examples
- Uses linked transaction and money-transaction objects to show shared sender data and an addFunds method.
- What you can do after
- Build it from scratch with Object.create and evaluate when delegation or property copying better fits an object model.
Read how The Joy of JavaScript explains prototype-based object orientation →
Secrets of the JavaScript Ninja, Second Edition
An object-oriented model in which objects inherit properties through prototype links rather than class inheritance.
- How it is used
- Frames prototypes as JavaScript’s object-orientation model and cautions against applying class-based expectations.
- How deep it goes
- Contrasts prototypes with class inheritance and signals deeper coverage of their operation and implementation, but gives no mechanics here.
- Examples
- Uses Java-trained developers who write class-based code in JavaScript and are surprised by the results.
- What you can do after
- Understand that JavaScript uses prototypes rather than class-based object orientation.
Related concepts
- JavaScriptused by · JavaScript is a high-level, dynamically typed, multi-paradigm programming language standardized as ECMAScript and used for web and general-purpose programming.
- prototypeuses · A JavaScript prototype is an object through which other objects can access properties and methods by delegation during lookup.
- classequivalent to · A class is a programming-language construct that defines a type’s structure or behavior and provides a basis for creating or representing objects.
- prototype chainhas part · A prototype chain is the linked sequence of JavaScript prototype objects consulted during property lookup when an object lacks the requested property itself.
- delegationcontrasts with · Delegation is a composition pattern in which one object forwards operations or property lookup to another object that provides the behavior.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

