How to use JavaScript Constructor Function ?

A JavaScript constructor function is a function that is used to create new objects. It is called a constructor because it constructs new objects. To create a…