This pointer, closure, and scope in JavaScript

Sharing today: this pointer, closure, scope in JavaScript

this: point to the calling context
Closure: the inner scope can access variables in the outer scope
Scope: Defining a function opens up a local scope, and the entire js execution environment has a global scope.

Guess you like

Origin blog.csdn.net/ni15534789894/article/details/111400061