Common JavaScript interview topics: types, equality, scope, closures, event loop, promises, and DOM basics.
Rapid review
typeof,===, truthy/falsy- Closure and lexical scope
- Event loop: call stack, microtasks vs macrotasks
- Promise vs async/await
- Prototype vs class syntax
Coding prompts
Flatten array, debounce, deep clone (discuss trade-offs), implement Promise.all sketch.
Important interview questions and answers
- Q: Event loop order?
A: Sync code, then microtasks (promises), then macrotasks (setTimeout). - Q: == vs ===?
A: Always === unless you understand coercion rules.
Self-check
- Explain closure.
- Microtask vs macrotask?
Tip: Re-run the playground code for interview-essentials-javascript and tweak one line before the MCQs.
Interview prep
- Event loop?
Coordinates stack, microtasks, and macrotasks.