Introduction
JavaScript powers almost every website on the planet, which makes it one of the most tested topics in technical interviews. The tricky part is that JavaScript has quirks โ hoisting, coercion, the event loop โ that trip up even experienced developers.
Below are 20 JavaScript quiz questions with clear answers and short explanations. Read through them to revise, then jump into the interactive quiz to test what stuck.
Core Concepts (Questions 1โ10)
What is the difference between `let`, `const`, and `var`?
Think of your answer, then reveal it to check.
When asked about `this`, always clarify *how* the function is called (method, standalone, arrow, or bound). That single distinction answers most `this` questions.
Async & Advanced (Questions 11โ20)
What is the event loop?
Think of your answer, then reveal it to check.
Do not compare floating-point numbers with `===`. Use `Math.abs(a - b) < Number.EPSILON` instead.