Break the component elements.
Suppose you were to do this:
function C() {
return this;
}
var o = C();
There is clearly no context for the object, so thisthere is window.
The wrap around this setting in the constructor does not change the fact that in the context of a direct call, C()there is no object associated with C().
source
share