Question 3 of 10Pro Only

Explain the prototype chain in JavaScript. How does prototypal inheritance work and how does it differ from classical inheritance?

Sample answer preview

In JavaScript, every object has an internal link to another object called its prototype. This prototype chain is the fundamental mechanism of inheritance in JavaScript. When you access a property on an object, JavaScript first looks at the object itself.

prototypeprototype chain__proto__Object.createinheritanceconstructor

Unlock the full answer

Get the complete model answer, key points, common pitfalls, and access to 9+ more Frontend Developer interview questions.

Upgrade to Pro

Starting at $19/month • Cancel anytime