About JavaScript Quizzes
JavaScript is the only language that runs natively in every web browser, and with Node.js it powers servers, CLIs, and serverless functions too. Its ubiquity makes it essential — but JavaScript's design decisions, accumulated over 30 years of backwards-compatible evolution, produce some genuinely surprising behaviours that catch even senior engineers off guard.
QuizBytesDaily's JavaScript quizzes explore the language at a deeper level than tutorials typically cover. We dive into the event loop and microtask queue, prototype chains and `this` binding, closures and lexical scope, the differences between `var`, `let`, and `const`, and why certain patterns work in strict mode but not in sloppy mode.
Modern JavaScript (ES6 through ES2024) has transformed how we write code: arrow functions, destructuring, optional chaining, nullish coalescing, Promises, async generators, top-level await, and more. Our quizzes cover both the legacy behaviours you need to understand to debug old codebases, and the modern features you should be using in new code.
Why Learn JavaScript?
What You'll Find in Our JavaScript Quizzes
- ✓Closures, scope, hoisting, and the temporal dead zone
- ✓Prototype chain, `this` binding, and `new` keyword
- ✓Event loop, call stack, microtask queue, and macrotask queue
- ✓Promises, async/await, and error handling patterns
- ✓ES6+ features: destructuring, spread, generators, symbols
- ✓Type coercion and equality (`==` vs `===`)
- ✓Module systems: CommonJS, ESM, dynamic imports
Other Quiz Categories
Sample JavaScript Quiz Questions
A taste of what you'll find in the JavaScript quiz series.
What does `typeof null` return in JavaScript?
Explanation: typeof null returns "object" — this is a well-known bug from the original JavaScript implementation in 1995. In the early engine, values were stored as a tag + value pair. The null pointer (0x00) happened to share the same type tag as objects. The bug was never fixed because doing so would break vast amounts of existing code. This is why null checks should use strict equality (`=== null`) rather than typeof.
What is the output of `0.1 + 0.2 === 0.3` in JavaScript?
Explanation: This evaluates to false. JavaScript uses 64-bit IEEE 754 floating-point arithmetic, and 0.1 and 0.2 cannot be represented exactly in binary — they are stored as repeating fractions. The actual sum is 0.30000000000000004, not 0.3. To compare floating-point numbers, use a tolerance: `Math.abs(0.1 + 0.2 - 0.3) < Number.EPSILON`.
Which of the following correctly describes the JavaScript event loop?
Explanation: JavaScript is single-threaded. After each macrotask (e.g. setTimeout callback, I/O event), the event loop empties the entire microtask queue (resolved Promises, queueMicrotask) before picking up the next macrotask. This is why `Promise.resolve().then(...)` always executes before a `setTimeout(..., 0)` callback scheduled before it — microtasks have higher priority than macrotasks.
Ready to test your JavaScript knowledge?
Free daily quizzes — no signup, no account, no cost.
Start JavaScript Quizzes →