prototype vs prototypal inheritance one liner definition

Prototype vs prototypal inheritance one liner defination required to clear interview, I can explain by writing some samples but the problem is explaining this on telephonic round

Please help

If you have an object-oriented language (a language where you can program using objects, which are structures that contain both data and the functions that operate on that data), you can share functionality by having a property (another object) attached to each object that has some common functionality, prototype.

When you want to create a new object of some given type, you copy the prototype as well, so you automatically get the common functionality.

If you have an object that is a subtype of another (like in JavaScript, an Array is a type of Object), then you inherit the functionality on the prototype of the supertype, prototypal inheritance.

I realise that this is a homework question of some kind: do you understand what I’ve written above? Don’t just copy it if you don’t.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.