+ 2

What is object prototype in Javascript ?

13th May 2020, 10:34 PM
Ankit Chaudhary
Ankit Chaudhary - avatar
2 Respostas
13th May 2020, 10:38 PM
Neriya Bar-lev
Neriya Bar-lev - avatar
+ 2
Prototypes are the mechanism by which JavaScript objects inherit features from one another. In this ,I am explaining how prototype chains work and look at how the prototype property can be used to add methods to existing constructors.All JavaScript objects inherit properties and methods from a prototype: Date objects inherit from Date.prototype;Array objects inherit from Array.prototype;Person objects inherit from Person.prototype The Object.prototype is on the top of the prototype inheritance chain:Date objects, Array objects, and Person objects inherit from Object.prototype.
14th May 2020, 5:09 AM
Divya Peddapalyam
Divya Peddapalyam - avatar