JavaScript Master
Closures, the event loop, this, promises. Boss fights on the trickiest output questions. Clear all 3 games to earn the JavaScript Master certificate.
Games


Predict the Output
Boss fight vs Null Pointer: output puzzles on this, closures, the event loop and prototypes.


Event Loop Express
Predict the console output, then watch the call stack, microtasks and task queue run the code step by step.


Answer Blaster
Arcade shooter: answer drones fly in and shoot back. Blast the right one and chase the hi-score.
What JavaScript Master covers
The parts of JavaScript that surprise people
JavaScript interviews often skip the basics and go straight to the behaviour that surprises developers: how this is decided, what a closure captures, why 0.1 + 0.2 is not 0.3, and in what order promises, timers and synchronous code run. Predict the Output asks you to read a short snippet and say exactly what it logs. Event Loop Express shows the call stack, the microtask queue and the task queue as you step through the code, so you can see why a resolved promise runs before a setTimeout of zero milliseconds.
Why the event loop matters
JavaScript runs your code on a single thread. Long synchronous work blocks everything else, including rendering and user input. Asynchronous APIs hand work off and queue a callback for later. After each task the engine empties the microtask queue (promise callbacks, queueMicrotask) before it takes the next task (timers, events). Once that order makes sense, most "what does this print" questions become straightforward.
Closures are the other big topic. A function keeps access to the variables of the scope it was created in, even after that scope has finished. That is how private state, memoised functions and event handlers that remember a value all work, and it is also the source of the classic bug where every callback in a var loop sees the last value.
How to practise
Before you reveal an answer, write down your prediction and the reason for it. When you are wrong, find the exact rule you missed and replay a similar snippet. Answer Blaster mixes questions from every topic, which is good revision once you have played the focused games.
FAQ
- Which JavaScript topics are covered?
- Scope and closures,
thisand arrow functions, prototypes, type coercion, promises and async/await, and the event loop, with output-prediction puzzles for each. - Is this useful for React or Node interviews?
- Yes. Both are built on the same language rules, and questions about closures, async code and the event loop come up in frontend and backend interviews alike.