How JavaScript Code is executed | Call Stack of JS
MindCraft Frontend Web Dev - JS Essential Lecture 3
Course by: MindCraft
In this lecture, we dive into the intricate details of how JavaScript code is executed within the JS Engine. We explore the creation of Execution Context and the workings of the Call Stack, providing a clear understanding of what happens behind the scenes when you run JavaScript code.
We cover fundamental topics such as the Memory Allocation Phase, Code Execution Phase, and the process of Function Invocation. Through practical code examples, you'll grasp how functions are invoked and executed in JavaScript, including scenarios involving the return statement.
Topics Covered:
00:00 - What happens when you run JavaScript Code?
00:32 - Code Example for Execution Context Creation
01:03 - Global Execution Context Creation
01:20 - Memory Allocation Phase & Code Execution Phase
05:56 - Function Invocation and Execution Context Creation
11:15 - What happens while executing return statement
16:35 - Recap of Code Execution synchronously
19:26 - Call Stack in JavaScript
22:21 - Other names of the Call Stack in JS
23:10 - Thank you for watching Namaste JavaScript
This tutorial provides a deep dive into JavaScript's execution model, equipping you with essential knowledge to master JavaScript development.