Javascript Prototype

Every JavaScript object has a prototype. The prototype is also an object. All JavaScript objects inherit their properties and methods from their prototype. JavaScript Prototypes All JavaScript objects inherit the properties and methods from their prototype. Objects created using an…