Interview Q&A · JavaScript · 12 questions in this topic

Rapid-Fire Revision — JavaScript Interview Q&A

All JavaScript topics

One-line answers spanning the whole bank — the final pass the night before the interview. Part of Scenarios & Rapid Fire · 204 questions in the JavaScript bank.

This rapid-fire round turns the JavaScript bank into short answers for a last review. The cards focus on the parts interviewers probe repeatedly: == versus ===, var/let/const scope, closures, this binding, the event loop and promise ordering. Say the answer and then name one consequence — a bug it prevents or a classic output puzzle. Name the phase — call stack, microtask queue or macrotask queue — that decides each output. Jump to the full topic from the menu when a one-liner needs the surrounding example.

== vs ===?

Answer

== coerces then compares; === compares type plus value with no conversion.

var vs let vs const?

Answer

Function-scoped hoisted var; block-scoped let/const, const single-assignment.

What is a closure?

Answer

A function bundled with its lexical birth scope — remembers outer variables.

Recommended resourcesAffiliate links · may earn us a commission

Classic DSA interview booksThe reference books interviewers themselves learned from — great next to the visualizers.See the books Structured coding coursesVideo courses that pair well with visual practice — pick one language and go deep.Browse courses Cloud hosting for side projectsShip the portfolio project that gets you hired — free credits for new accounts.Claim credits