Ahmed Hamada JavaScript Blog
Articles on JavaScript fundamentals -- closures, hoisting, the call stack, the event loop, promises, and async/await.

Mastering Promises and Async/Await in JavaScript
Promises and Async/Await are essential tools in JavaScript for handling asynchronous operations. They provide a more manageable and readable way to write asynchronous code, avoiding callback hell and enhancing error handling.
Learn More
Understanding Immediately Invoked Function Expressions (IIFE) in JavaScript
Immediately Invoked Function Expressions (IIFE) are a popular pattern in JavaScript that allow developers to create and execute functions immediately, providing benefits like scope isolation and avoiding global namespace pollution.
Learn More
Understanding JavaScript Execution: Call Stack, Event Loop, Tasks, and More
JavaScript is a single-threaded language, meaning it can only execute one task at a time. However, it can handle both synchronous and asynchronous operations with the help of tools like the Call Stack, Event Loop, and Task Queues. Understanding these concepts is crucial for efficient coding.
Learn More
Understanding Hoisting in JavaScript: var, let, and const
Hoisting is an essential JavaScript concept that affects how variables are handled by the interpreter. This post explains how hoisting works with `var`, `let`, and `const`, and how to avoid common pitfalls.
Learn More
Demystifying Closures in JavaScript
Closures are a powerful feature in JavaScript that allow functions to retain access to their lexical scope even when executed outside their original context. This concept is essential for creating private variables, implementing partial applications, and more.
Learn More
The this Keyword, Demystified
The `this` keyword is one of the most misunderstood parts of JavaScript. Its value isn't fixed -- it depends entirely on how a function is called. This post breaks down the binding rules and the special case of arrow functions.
Learn More
JavaScript Modules: ESM vs CommonJS
ES Modules and CommonJS are the two dominant module systems in the JavaScript ecosystem. Though they solve the same problem -- splitting code into reusable, encapsulated files -- they differ fundamentally in syntax, resolution timing, and loading behavior.
Learn More