Call method | function function | Arrow function |
---|---|---|
Ordinary function | this Pointing to window objects |
this Pointing to window objects |
Function as an object method | this Points to the object calling the method |
this Pointing to window objects |
Constructor | this Point to new create objects |
Arrow functions cannot be used as constructors |
bind, apply, call | this Point to the newly bound object |
this Keep the original direction ( the this direction of the arrow function is fixed ) |
the this point of the javascript browser
Guess you like
Origin blog.csdn.net/SJ1551/article/details/109294801
Recommended
Ranking