
What a semaphore is, in plain words: a counter that lets at most N tasks use a resource at once. How to limit parallel requests with it and avoid 429s.

async or defer: the difference for the script tag and which to pick. A comparison on five criteria, plus the trap: async scripts run in a random order.

What is the event loop in JavaScript, in plain words: why setTimeout(0) waits for promises and why a heavy loop freezes the whole page.

How to pause (sleep) in JavaScript: a setTimeout and await delay, pausing in a loop between requests, and the forEach trap that never waits. With code.

A Promise in JavaScript isn't the answer — it's a receipt for one. Why your console prints Promise pending, how await fixes it, and where beginners lose data.

Async code doesn't wait: it moves on while the answer is still in transit. That's why your data is undefined even though it clearly arrives — and how await fixes it.