In the above example we generated three instances of the Person class and assigned them to their respective variables,
george. We may query these instances with property specific dot notation or by property index bracket notation.
console.log(bob.name); // Bob Smith
console.log(susan.age); // 25
console.log(george['name']) // George Washington
Notice how each object has only the property values assigned when they were instantiated. There is a lot of work going on in the background that we do not see. It is thanks to
new that we only get direct properties associated with the instance, not the entire
this object, which is very verbose. That is why we do not write a return statement in a constructor function.