New Operator In Javascript

new func(arg);
  1. Creates a new object
  2. Invokes func with ‘this’ set to the newly created object, passing any arguments along to func (‘arg’ in the above example).
  3. Sets the new object’s prototype equal to func’s prototype.
  4. Returns the new object

Example Property lookup

var f = new func();

f -> func.prototype -> Object.prototype