new operator and function constructor in Javascript
new operator and function constructor in Javascript Constructor function The constructor function can be created with a new keyword When a new operator is used to create a function the following things happen How it works The new empty object is created The function is called and this keyword is…