✔Date objects inherit properties from the Date prototype.
✔Math objects inherit properties from the Math prototype.
✔Array objects inherit properties from the Array prototype.
On top of the chain is Object.prototype. Every prototype inherits properties and methods from the Object.prototype.
A prototype is a blueprint of an object.
Prototype allows us to use properties and methods on an object even if the properties and methods do not exist on the current object.
Let’s see prototypes help us use methods and properties:
var arr = [1,2,3,4,5]; arr.pop(); //Returns 5
The reason being the use of prototypes. As we discussed before, Array objects inherit properties from the Array prototype.
For more info, check out this:-