Author name: Khushi Kumari

Working with the Event Loop and Async JavaScript (Microtasks & Macrotasks)

JavaScript is single-threaded, meaning it executes one task at a time. The event loop is the mechanism that manages asynchronous operations by coordinating the call stack and task queues. When async tasks (like setTimeout, Promises, or async/await) are executed, they’re scheduled in either the macrotask queue (e.g., setTimeout, setInterval) or the microtask queue (e.g., Promises, …

Working with the Event Loop and Async JavaScript (Microtasks & Macrotasks) Read More »

JavaScript Debouncing vs. Throttling (Optimizing Event Listeners)

In this tutorial, we will learn about javascript debouncing vs. throttling (optimizing event listeners) with some cool and easy examples. In many situations, you might have to come up with this type of requirements. What is Debouncing in JavaScript? Debouncing is a technique used to limit how often a function is called. It ensures that …

JavaScript Debouncing vs. Throttling (Optimizing Event Listeners) Read More »

Scroll to Top