The *this is only relevant to the execution environment and is independent of the declaration environment. Whoever calls This,this is pointing to WHO.
*this's point is divided into four types:
1. As a normal function call:
2. Method invocation as an object:
Points to the object, but when the method is referenced with a new variable, it becomes a normal function call, pointing to window:
Explanation: The method is actually an object, the attribute assigns a function, and the O.GETN represents this function, assigns it to a new variable call, becomes the ordinary function call.
3. In the constructor, point to the instance object computed by the new operator.
4.apply Call:
The function of apply is to change the calling object of the function, whose first parameter represents the changed calling object, so this point points to the first parameter.
* The global function is called by default when the argument to apply is null or NULL.
* Sometimes we use call and apply for the purpose of not specifying the point of this, but rather the method of borrowing other objects, then we pass NULL instead of a specific object.
Math.max.apply (null,[1,2,33,4,6]);//33
Explore JavaScript----This pointing problem