Repository navigation
scope
serhij.zolotukhin edited this page Dec 7, 2025
·
1 revision
-
Execution stack
1. JavaScript is a single threaded language, meaning only one task can be executed at a time. 2. execution stack contains a list of Execution Context 3. The browser will always execute the current execution context that is atop the execution stack. -
Execution Context consist of:
1. variable object (also called an activation object) 2. Scope chain 3. Context (this) -
Activation object is an object which holds:
1. formal args of the function 2. arguments object for this function 3. any vars and (named) functions inside this function -
Context
1. -
Scope
1. This set of identifiers that each function has access to is called “scope.” 1. It is used for determining variable access and identifier resolution. 3. Лексическая область видимости означает, что область видимости определена решениями о том, где объявляются функции на стадии написания кода -
Scope / Scope chain
1. We can nest scopes into a hierarchical chain of functions known as the “scope chain”. -
Prototype
1. every JavaScript function has a prototype property 2. Properties are looked up firstly on the base object, then on that object's [[Prototoype]] chain (i.e. its internal prototype). 3. The prototype property is used primarily for inheritance; 4. add methods and properties on a function’s prototype property to make it available to instances of that function. 5. An object’s prototype attribute points to the object’s “parent”—the object it inherited its properties from.
My footer
My side bar