What is the prototype in javascript and how do you use it?
Prototypes are objects created in Javascript. They are the “parent” objects. If we want to create common tasks (properties/methods) for all the objects inherited from the parent object we need to define them in the prototype object.
BY Best Interview Question ON 30 Jan 2020