When a function is called, there is an implicit parameter----the This----is also assigned, in addition to the parameters that are explicitly declared when the function definition is assigned.
This parameter points to an object that is implicitly related to the function call, which is referred to as the context of the function (functions context), or called the invocation context (invocation contexts), and may feel clearer.
When called as a function
Function Ninja () {};
Ninja ();
In this case, the function context is the global context----the Window object.
When called as a function, the function is defined in the Window object, but in principle it is the same as the function being called as a method call.
When called as a method
var o = {};
O.whatever = function () {};
O.whatever ();
Points to the owning object.
Called as a constructor
When the constructor is called, the following behavior occurs:
A new empty object is created
The object is passed as a parameter to the constructor and becomes the function context of the constructor function
The new object is returned as the return value of the constructor function
Through the Apply () and call () methods
Juggle.apply (NINJA1, [1,2,3,4]);
Juggle.call (NINJA2, 5,6,7,8);
The context in which a function call can be explicitly defined
References: <secrets of the JavaScript ninja>
The "This" parameter in JavaScript