When you declare a function: function Person() {} The interpreter creates the new function object from your declaration. Together with the function, it’s prototype property is created and populated. This prototype is an object with property constructor, which is set to the function itself.

MyConstructor.prototype = { constructor: MyConstructor }

A global variable ‘name’ will created in the global space

Constructor : references the constructor function used to create this object

Inside bar, !foo returns true because of var foo would hoist it to the top and set it to null