Execution Phase and Variable Object

preview_player
Показать описание
In the last lecture, we learned how the JavaScript engine manages the execution context inside call stack. In this lecture, you will learn how the execution context is created by JavaScript engine and what does it store.

When a function is called, a new execution context is created and put on top of the currently executing execution context. JavaScript engine creates the execution context in the two phases:
1. Creation Phase
2. Execution Phase

Creation phase is the phase in which the JavaScript engine has called a function, but its execution has not yet started. In the creation phase, JavaScript engine is in the compilation phase and it just scans over the function code in order to compile it. The code is not executed in creation phase.

We can associate an execution context with an object. This object has three main properties.
1. Variable object
2. Scope chain
3. The ‘this’ variable

These three properties of execution context are created during creation phase.

In this lecture, we will mainly focus on creation of Variable object property of execution object.
Рекомендации по теме
Комментарии
Автор

WOW! I subscribed immediately I jumped on this video. DAMN!!!! this was so easy for me to understand, and it also took my js skill level to a greater height. Thanks procademy.

simoncharles
Автор

Very helpful video .

Only one doubt left i.e
In creation phase,
any Variable of functions is initialised with undefined or <uninitialised> but why it is not in case of arguments why parameters of functions initialised with value itself .

Please clear this point

bishwajeetpandey
Автор

how come you only get so few viewers? this not fair, btw thanks for the knowledge

habibigusti
Автор

Sir i dont understand, so all this is happening inside Javascript Engine which is just a program written in C or C++ .. But these execution contexts are actually objects ? And inside these objects there are other objects like Variable Object and Scope chain ? Also this Execution Context gets created after the high level language was transformed into binary or before ? I don't understand anymore

exe.mdnght