Now Let's explore how an execution context is created by the JavaScript engine, which we have seen in the previous article, and how the JavaScript engine controls the execution context.

In this article, we will learn what is creation phase and execution phase in javascript.

Basically, the Execution context has two pahses:1) Creation phase and 2) Execution phase

1) Creation phase :

For Each Function(function Declaration) property is created in the variable object, which is pointing to that function.

For each variable(Variable Declaration) property is created in the variable Object, Which is then set to undefined

Arguments Objects are created that were passed into the function

In other words this process is also called Hoisting.

Hoisting is a javascript mechanism where variables and function declarations are moved to the top of their scope before the code execution.

2) Execution phase:

Current Execution context run line by line.

Topics covered:

Found this article helpful?

TutsCoder tutorials are free and ad-light — supported by readers like you. Buy me a coffee (or two ☕☕) as a token of appreciation and help keep Angular & Node.js content coming!

One-time. No subscription. 100% optional. 🙏 Every coffee counts!

Leave a Comment

Your email will not be published. Spam-free zone. ✌️

Available for Projects

Need Help With Your
Angular or Node.js Project?

7+ years of MEAN Stack experience. I build scalable Angular 21 apps, Node.js APIs, and SaaS products — delivered on time, every time.

7+ Years MEAN Stack Angular 21 + Nx Expert 20+ Projects Delivered Remote / Freelance