Rapid-fire questions from junior to senior level. Expand each for a crisp, interview-ready answer; follow the topic links in your head to go deeper.
Fundamentals
What are the data types in JavaScript?
var vs let vs const?
What is the temporal dead zone?
null vs undefined?
== vs ===?
What is NaN and how do you test for it?
Functions & scope
What is a closure?
What is hoisting?
Explain this in JavaScript.
call vs apply vs bind?
Arrow functions vs regular functions?
What are higher-order functions?
Currying vs partial application?
Objects & prototypes
How does prototypal inheritance work?
What does the new keyword do?
How do you deep-copy an object?
Object.freeze vs Object.seal?
Map vs Object, Set vs Array?
What are WeakMap and WeakSet for?
Asynchronous JavaScript
Explain the event loop.
Microtask vs macrotask?
What is a Promise?
Promise.all vs allSettled vs race vs any?
How does async/await relate to promises?
How do you run async tasks in parallel vs in sequence?
How do you cancel a fetch or other async work?
Browser & performance
What is event delegation?
Event bubbling vs capturing?
Debounce vs throttle?
What causes memory leaks in JavaScript?
localStorage vs sessionStorage vs cookies?
What is CORS?
Modules, tooling & modern JS
ES modules vs CommonJS?
What is strict mode?
What is a polyfill vs a transpiler?
Why use TypeScript?
What are generators used for?
What is a Proxy?
How to answer well
Define
One precise sentence (“A closure is…”).
Show
A 3–5 line example — ideally one you can run in your head.
Explain the why
Mention the underlying mechanism (scope chain, prototype chain, event loop).
Trade-offs & pitfalls
When not to use it, the common bug, the modern alternative.