How the Constructor Function Creates an Object

A constructor function creates an object template. To create a rectangle object, the following example uses a constructor function:

function Rectangle(width, height)
{
   this.width = width;
   this.height = height;
}

The following keyword references the arguments that the constructor function receives:

this

You can think of the this keyword as meaning this object.