JavaScript MCQ
Test your JavaScript knowledge with 100 multiple choice questions covering fundamentals to advanced concepts, with instant feedback and explanations.
Which keyword declares a block-scoped variable in modern JavaScript?
2What does typeof null return in JavaScript?
3What is the output of 0.1 + 0.2 === 0.3 in JavaScript?
4What does === check in JavaScript?
5What is a closure in JavaScript?
6What does the spread operator ... do?
7What is event bubbling?
8What does Array.prototype.map() return?
9What is hoisting in JavaScript?
10What is the Temporal Dead Zone (TDZ)?
11What is a Promise in JavaScript?
12What is the difference between null and undefined?
13What does Array.prototype.filter() return?
14What is the this keyword in a regular function vs arrow function?
15What does JSON.stringify() do?
16What is the prototype chain?
17What does the Array.prototype.reduce() method do?
18What is an Immediately Invoked Function Expression (IIFE)?
19What is event.preventDefault() used for?
20What is NaN in JavaScript?
21What does the typeof operator return for a function?
22What is destructuring in JavaScript?
23What does Array.prototype.find() return?
24What is the difference between for...of and for...in?
25What is a template literal?
26What does the optional chaining operator ?. do?
27What is the difference between == and ===?
28What does Object.keys() return?
29What is a Set in JavaScript?
30What is a Map in JavaScript?
31What does async/await do?
32What does Array.isArray() do?
33What is the ternary operator?
34What is the difference between let, const, and var?
35What does String.prototype.split() return?
36What is the purpose of the new keyword?
37What is the event loop?
38What does Object.assign() do?
39What is a Symbol in JavaScript?
40What does Array.prototype.some() return?
What is the difference between microtasks and macrotasks?
2What is the WeakMap?
3What is a generator function?
4What is currying in JavaScript?
5What does Object.freeze() do?
6What is the difference between call(), apply(), and bind()?
7What is prototype-based inheritance in JavaScript?
8What is memoization?
9What are Proxy and Reflect in ES6?
10What is the difference between shallow and deep copy in JavaScript?
11What does Promise.all() do?
12What is the difference between Promise.race() and Promise.any()?
13What is the module pattern in JavaScript?
14What is a Symbol.iterator used for?
15What does structuredClone() do?
16What is the purpose of WeakRef?
17What is the Nullish Coalescing operator ??
18What is the difference between Object.create(null) and {}?
19What is tagged template literals?
20What is the purpose of FinalizationRegistry?
21What is the difference between Array.prototype.forEach() and for...of?
22What is the difference between Array.from() and Array.of()?
23What is async iteration (for await...of)?
24What is the purpose of Object.entries() and how is it commonly used?
25What is a JavaScript Proxy handler's set trap used for?
26What is the difference between Object.keys() and Reflect.ownKeys()?
27What is a JavaScript realm and its security implication?
28What is the Error.cause property (ES2022)?
29What is logical assignment (&&=, ||=, ??=) in JavaScript?
30What is Array.prototype.at() and why was it added?
31What is the hasOwn() method (ES2022)?
32What is the structuredClone() limitation with functions?
33What is the difference between Symbol.toPrimitive and valueOf?
34What is the temporal proposal (TC39 Stage 3) for JavaScript date handling?
35What is Promise.withResolvers() (ES2024)?
36What is the iterator helpers proposal (Stage 3) in JavaScript?
37What is the Object.groupBy() method (ES2024)?
38What is the RegExp v flag (ES2024)?
39What is the TC39 decorators proposal (Stage 3)?
40What is the difference between Array.prototype.flatMap() and map().flat()?
What is the V8 engine's hidden class (shape) optimization?
2What is the event loop's relationship with the call stack and Web APIs?
3What is realm in JavaScript contexts?
4What is the difference between AbortController and CancellationToken?
5What is tail call optimization (TCO) in JavaScript?
6What is the difference between structuredClone and the history state algorithm?
7What is the purpose of TransferableObjects with postMessage?
8What is a JavaScript engine's inline cache (IC)?
9What does the stage proposal process mean for JavaScript features?
10What is the difference between ESM and CJS module systems?
11What is a BigInt in JavaScript and when would you use it?
12What is the difference between JSON.parse() reviver and JSON.stringify() replacer?
13What is the V8 engine's deoptimization?
14What is the JavaScript abstract machine and how does it relate to spec compliance?
15What is the Temporal Dead Zone for let/const class fields?
16What is the AsyncLocalStorage API in Node.js?
17What is the JavaScript engine's code cache?
18What is the Node.js Worker Threads module?
19What is the difference between WebAssembly.Memory and regular JavaScript ArrayBuffer?
20What is the JavaScript type coercion for addition with objects?