Junior From PDF JavaScript JavaScript

What is prototypal inheritance?

JavaScript objects inherit properties and methods from other objects through

prototypes. This allows reuse of methods and shared behavior.

Example:

const parent = { greet() { console.log("Hello"); } };
const child = Object.create(parent);

child.greet(); // Hello

More from JavaScript Tutorial

All questions for this course
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details