ForgeFrontend — Prepare, Practice, Crack
Secure checkout
Lifetime access
Instant Drive delivery
Free updates forever

Prepare · Practice · Crack

What is prototypal inheritance?

Quick answer

Objects delegate to other objects via a prototype link; property lookups walk the prototype chain until found or null.

In detail

Each object has an internal [[Prototype]] pointing to another object. Missing properties are looked up along the chain. Shared methods live once on a prototype while many instances delegate to it — memory-efficient and the basis of how `class` works under the hood.

const arr = [1, 2, 3];
arr.map;  // found on Array.prototype, not on arr
Object.getPrototypeOf(arr) === Array.prototype; // true

Why interviewers ask this: Separates people who memorised classes from those who get the model.

Common follow-up questions

  • What's the difference between __proto__ and prototype?

This is 1 of 118+ questions in the JavaScript Interview Kit

Get every question with detailed answers, follow-ups and real code — plus coding challenges and a last-minute revision sheet. One-time payment, instant access.

⚡ Get the JavaScript Interview Kit → ₹299

Full kit

JavaScript Interview Kit · ₹299

Get it →