Google News
logo
UI Developer - Interview Questions
Describe the distinction between Class and Prototypal inheritance in Javascript?
From most other programming languages, Inheritance in JavaScript is different. JavaScript's object system is prototype-based, not class-based. Objects in JavaScript are just a set of value pairs and a name (key). Talking about inheritance, JavaScript just has one construct: objects. Each object has a private property that includes a link to another object named its prototype.
Advertisement