Top Javascript Questions & Practice
Master 50+ essential Javascript questions ranging from core fundamentals to senior-level real-world scenarios.
Junior Fundamentals — Question 1
Core language fundamentals.
Which keyword declares a block-scoped variable that can be reassigned?
Junior Fundamentals — Question 2
Core language fundamentals.
What is the result of typeof null?
Junior Fundamentals — Question 3
Core language fundamentals.
Which value is falsy?
Junior Fundamentals — Question 4
Core language fundamentals.
What is the main difference between == and ===?
Junior Fundamentals — Question 5
Core language fundamentals.
What does const prevent?
Junior Fundamentals — Question 6
Core language fundamentals.
Which declaration is function-scoped?
Junior Fundamentals — Question 7
Core language fundamentals.
What does Object.is(NaN, NaN) return?
Junior Fundamentals — Question 8
Core language fundamentals.
Which operator should generally be used when you want a fallback only for null or undefined?
Junior Fundamentals — Question 9
Core language fundamentals.
What does typeof 10n return?
Junior Fundamentals — Question 10
Core language fundamentals.
Which statement about arrays is correct?
Core Functions & Objects — Question 11
Functions, closures, objects, and prototypes.
What is a closure?
Core Functions & Objects — Question 12
Functions, closures, objects, and prototypes.
How is this generally determined for a normal function?
Core Functions & Objects — Question 13
Functions, closures, objects, and prototypes.
How do arrow functions handle this?
Core Functions & Objects — Question 14
Functions, closures, objects, and prototypes.
What does bind() return?
Core Functions & Objects — Question 15
Functions, closures, objects, and prototypes.
What happens when an object property is not found directly on the object?
Core Functions & Objects — Question 16
Functions, closures, objects, and prototypes.
Where are normal class methods stored?
Core Functions & Objects — Question 17
Functions, closures, objects, and prototypes.
What does new generally do when used with a constructor function?
Core Functions & Objects — Question 18
Functions, closures, objects, and prototypes.
Which syntax creates a private class field?
Core Functions & Objects — Question 19
Functions, closures, objects, and prototypes.
What does map() normally return?
Core Functions & Objects — Question 20
Functions, closures, objects, and prototypes.
Which collection guarantees unique values?
Async & Event Loop — Question 21
Promises, async/await, queues, and event-loop behavior.
What are the three main Promise states?
Async & Event Loop — Question 22
Promises, async/await, queues, and event-loop behavior.
What does an async function return?
Async & Event Loop — Question 23
Promises, async/await, queues, and event-loop behavior.
Which queue processes Promise reactions?
Async & Event Loop — Question 24
Promises, async/await, queues, and event-loop behavior.
What is the output order?
Async & Event Loop — Question 25
Promises, async/await, queues, and event-loop behavior.
Does await block the entire JavaScript runtime?
Async & Event Loop — Question 26
Promises, async/await, queues, and event-loop behavior.
Which combinator waits for every Promise to settle regardless of outcome?
Async & Event Loop — Question 27
Promises, async/await, queues, and event-loop behavior.
What happens to Promise.all when one input rejects?
Async & Event Loop — Question 28
Promises, async/await, queues, and event-loop behavior.
Which Promise combinator fulfills when the first input fulfills?
Async & Event Loop — Question 29
Promises, async/await, queues, and event-loop behavior.
Why does a zero-delay timer not necessarily execute immediately?
Async & Event Loop — Question 30
Promises, async/await, queues, and event-loop behavior.
Can excessive microtask scheduling delay ordinary tasks?