Moniruzzaman Mahdi’s Post

🚀 JavaScript Deep Dive — Part 2: Execution Context Ever wondered how JavaScript actually runs your code? 🤔 That’s done through something called an Execution Context — the environment where your code executes. 🧩 Types of Execution Context: 1️⃣ Global Execution Context (GEC) → Created once when the file runs. 2️⃣ Function Execution Context (FEC) → Created each time a function is called. ⚙️ Each has 2 Phases: 1. Creation Phase: Memory is set for variables & functions. Variables = undefined (hoisting). this keyword is set. 2. Execution Phase: Code runs line by line. Variables get real values. 💡 In short: JS runs code inside execution contexts, managed by a call stack — one at a time, top to bottom. #JavaScript #WebDevelopment #Frontend #LearnInPublic #Coding

  • text

To view or add a comment, sign in

Explore content categories