Explanation: Scope Scope is a variable in your code (variable), function (function) and object (object) at runtime (runtime) accessibility (accessibility). In other words, the scope Scope decision within a specific area in your code, variables, and other resources are visible.
In js, each function has its own scope. Scope is basically a collection of variables and how to access these variables rule by name. Only in the function code to access the variable function scope.
The same scope of variable names must be unique. A scope can be nested in another scope. If a scope is nested in another scope, the code innermost scope can access another variable scope.
JavaScript in scope (scope) What does it mean?
Guess you like
Origin blog.csdn.net/qq_42893625/article/details/104448932
Ranking