Prototype
A JavaScript prototype is an object through which other objects can access properties and methods by delegation during lookup.
The Joy of JavaScript
In JavaScript object creation, the prototype is an object that serves as the shared delegate from which other objects can inherit properties and methods.
- How it is used
- Uses prototypes to share properties and methods across linked JavaScript objects without duplicating them.
- How deep it goes
- Works through Object.create, property lookup, differential inheritance, and constructor-chain configuration; explicitly defers detailed treatment of property shadowing.
- Examples
- Models linked transaction objects, shared hash-calculation methods, and constructor-based transaction hierarchies.
- What you can do after
- Build it from scratch with Object.create or constructor prototypes, and diagnose missing methods by checking prototype-chain links.
Secrets of the JavaScript Ninja, Second Edition
An object from which another object can inherit properties in JavaScript.
- How it is used
- Organizes reusable object properties and methods through delegated lookup and inheritance.
- How deep it goes
- Works through prototype-chain lookup, constructor-created links, and runtime changes; does not describe engine-level lookup internals.
- Examples
- Uses linked objects with property checks, a constructor-provided method, and prototypes changed after instantiation.
- What you can do after
- Build it from scratch by linking objects or assigning shared methods to a constructor's prototype, and predict which instances see later changes.
Read how Secrets of the JavaScript Ninja, Second Edition explains prototype →
Essential TypeScript 5, Third Edition
The prototype system is JavaScript's object-inheritance mechanism in which objects delegate property and method lookup to prototype objects.
- How it is used
- Explains how JavaScript objects share inherited behavior and how that behavior underlies classes.
- How deep it goes
- Works through lookup, shared-prototype changes, custom chains, constructors, shadowing, and type checks using code examples.
- Examples
- Uses hat and boots objects, product constructors, taxed products, and index.js listings to trace shared methods and inheritance.
- What you can do after
- Build it from scratch with custom or constructor prototypes, and diagnose inherited-method lookup with prototype checks.
Read how Essential TypeScript 5, Third Edition explains prototype →
Related concepts
- classimplemented by · A class is a programming-language construct that defines a type’s structure or behavior and provides a basis for creating or representing objects.
- new keywordused by · In JavaScript, new is an operator that creates an object instance by invoking a constructable function or class as its constructor.
- JavaScriptused by · JavaScript is a high-level, dynamically typed, multi-paradigm programming language standardized as ECMAScript and used for web and general-purpose programming.
- prototype chainpart of · A prototype chain is the linked sequence of JavaScript prototype objects consulted during property lookup when an object lacks the requested property itself.
- prototype-based object orientationused by · Prototype-based object orientation is an object model in which objects obtain properties or behavior through links to other objects called prototypes.
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.


