liveBook · Manning

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.

How 3 Manning books explain it

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.

Read how JavaScript in Depth explains prototype chain →

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

Related concepts

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.