Home >Web Front-end >JS Tutorial >A brief discussion on the this pointer in Javascript_javascript skills
(1) Use this in the global execution environment to identify the Global object, which is the window object in the browser.
(2) When using this in a function execution environment, if the function is not obviously an attribute of a non-window object, but just defines a function, regardless of whether the function is defined in another function, in this function The this still identifies the window object. If the function is explicitly used as a property of a non-window object, then this in the function represents this object.