Four cases of this

1. When at the time point window function call;

2. When the method call is directed to call the object;

3. When the call with the calling context and apply point passed the first parameter;

4 .. The constructor calls the instance of an object point

Summary: If you are creating an object with a new way, this points to the newly created objects;

      If just ordinary call, who calls this function, the function where this points to anyone.

 

Guess you like

Origin www.cnblogs.com/yaya-003/p/11295102.html