Prototype chain
A prototype chain is the linked sequence of JavaScript prototype objects consulted during property lookup when an object lacks the requested property itself.
Secrets of the JavaScript Ninja, Second Edition
The linked sequence of prototype objects consulted during inherited property lookup.
- How it is used
- Supports inherited property lookup by linking objects so searches can continue beyond an object’s own properties.
- How deep it goes
- Explains prototype linking through constructor functions and instanceof checks, including how changing a function’s prototype affects results.
- Examples
- Uses Person and Ninja constructors, a dance method, and instanceof checks to demonstrate prototype inheritance.
- What you can do after
- Evaluate inherited access and instanceof results by tracing an object’s prototype chain.
Read how Secrets of the JavaScript Ninja, Second Edition explains prototype chain →
JavaScript in Depth
The linked sequence of prototype objects that JavaScript searches when resolving an object's inherited properties.
- How it is used
- Explains inherited property lookup, shared methods, dynamic behavior changes, and precise own-property checks.
- How deep it goes
- Traces lookup, shadowing, mutation, inspection, and this binding, while deferring broader runtime optimization details.
- Examples
- Uses shared drawer objects, Object.create, chain inspection, in, Object.hasOwn, and class accessors.
- What you can do after
- Diagnose inherited-property bugs, inspect chains, share methods, and recognize prototype mutation or shadowing.
Secrets of the JavaScript Ninja, Third Edition
The linked sequence of prototype objects used for JavaScript inheritance and property lookup.
- How it is used
- Explains delegated property lookup as JavaScript’s mechanism for object inheritance.
- How deep it goes
- Traces lookup through successive prototypes and connects the mechanism to class inheritance.
- Examples
- Demonstrates skulk, sneak, and creep lookup across three objects and inherited methods across Person and Ninja.
- What you can do after
- Understand property access by tracing own properties and fallback lookup through a prototype chain.
Read how Secrets of the JavaScript Ninja, Third Edition explains prototype chain →
Also covered in
What to know first
- objectAn object is a distinct entity represented or manipulated within a computational system, typically as a value, data structure, resource, or instance of a type.
- functionA function is a callable unit of program code that performs a computation or operation, can accept inputs, and may produce a result or side effect.
- JavaScriptJavaScript is a high-level, dynamically typed programming language standardized as ECMAScript and used for web and general-purpose programming.
- prototypeA JavaScript prototype is an object through which other objects can access properties and methods by delegation during lookup.
Related concepts
- instanceof operatorused by · The instanceof operator tests whether an object or reference is compatible with a specified runtime type or constructor according to the programming language’s rules.
- prototypehas part · A JavaScript prototype is an object through which other objects can access properties and methods by delegation during lookup.
- property lookupused by · Property lookup is JavaScript’s process of resolving a property by checking an object and, if necessary, its prototype chain.
Questions about prototype chain
What is prototype chain?
A prototype chain is the linked sequence of JavaScript prototype objects consulted during property lookup when an object lacks the requested property itself.
Which Manning books explain prototype chain?
Secrets of the JavaScript Ninja, Second Edition, JavaScript in Depth and Secrets of the JavaScript Ninja, Third Edition.
What should I know before learning prototype chain?
Manning books that teach prototype chain usually introduce object, function, JavaScript and prototype first.
What is the difference between prototype chain and Object.hasOwn()?
A prototype chain is the linked sequence of JavaScript prototype objects consulted during property lookup when an object lacks the requested property itself. Object.hasOwn() is a JavaScript static method that tests whether an object has a specified own property, excluding inherited properties.
What are the parts of prototype chain?
Prototype chain includes prototype.
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.


