js: and this is the difference between self

Note here that the difference between this and the self, self window is the current object is static; self relatively speaking, this is a dynamic means is based on runtime execution environment binding function, i.e., in the global object, this points to the window object; in a custom function, this points to the object is to call the function of the object, that is to say, this points to an object that calls the execution environment. If the nest is a function environment, this refers to the object calls an external function or an internal function of the execution environment.

Guess you like

Origin blog.csdn.net/yunxuantu/article/details/89308523