Browser Event Loop
Concept Check Medium
Question
How does the browser handle a slow synchronous JavaScript operation?
Hint
JavaScript in the browser is single-threaded.
Explanation
JavaScript runs on a single main thread in the browser. A long-running synchronous operation blocks the event loop, meaning the UI cannot update, respond to clicks, or handle events until it finishes. This is why long tasks should be made asynchronous (e.g., using Web Workers or async APIs).
Related Resources
Related Lessons
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.