In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
Editor to share with you what the basic knowledge of JavaScript, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to understand it!
1. Execution environment: sometimes called environment, is one of the most important concepts in JavaScript. Execution environment defines other data that variables or functions have access to.
2. Variable object: each execution environment has a variable object associated with it, and all variables and functions defined in the environment are stored in this object.
3. Scope chain: when the code is executed in the environment, a scope chain of variable objects is created to ensure orderly access to all variables and functions that the execution environment has access to. The front end of the scope chain is always the variable object of the environment in which the code is currently executed.
4. Active object: if the current execution environment is a function, the active object is used as a variable object.
5, executable code: 1) global code: such as loading external JS files or local tags within the code, the global code does not include the function body code; 2) function code: function body code; 3) eval code: eval () function calculates a string and executes the JS code, such as eval ("alert ('hello world')").
6. Execution context stack: in a JS program, multiple execution contexts must be generated, and the JS engine will handle them as a stack, that is, the execution context stack.
7, scope: JS is a language without block-level scope (including the curly braces code blocks of if, for and other statements or individual curly braces code blocks can not form a local scope), so the formation of the local scope of js is formed by and only the code blocks defined in the function's curly braces, that is, the function scope.
8. Scope chain: it is the implementation of scope rules. Through the implementation of scope chain, variables can be accessed in its scope and functions can be called in its scope. The scope chain is an one-way linked list, and each node on the linked list is the variable object of the execution context. the head of the one-way linked list (the first node that can be accessed) is always the variable object (active object) of the function being called and the tail is always the global active object.
9. Closure: function objects can be related to each other through the scope chain, and the data in the function body (variables and function declarations) can be stored in the function scope, which is called "closure" in the computer science literature. From a technical point of view, the functions of JS are all closures: the functions are all objects, they are all associated with the scope chain, and the data in the function is saved in the scope of the function.
These are all the contents of the article "what are the basics of JavaScript". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.