Every JavaScript object has a constructor function that acts…
Every JavaScript object has a constructor function that acts as a template for all the properties and methods associated with the object’s class, and a prototype, which can be thought of as a machine to instantiate objects.