JavaScript Challenges

JavaScript Quiz & Practice

The language that runs the web — and bites developers every day.

JavaScript has more quirks per line than any other language. typeof null, hoisting, closures, async traps — these aren't tricks, they're real bugs in real codebases. Solve one JS shot a day to build the instincts that separate senior engineers from the rest.

67 Total Shots
18 Junior
28 Mid-Level
21 Senior

5 Must-Know JavaScript Concepts

The topics that come up again and again in interviews — and in bugs.

🔒
Closures & Scope
Lexical scope, variable capture, and the IIFE pattern.
Hoisting
How var, let, const, and function declarations get lifted.
Event Loop & Async
Microtasks, macrotasks, Promises, and async/await order.
🔗
Prototypal Inheritance
__proto__, Object.create(), and the prototype chain.
🧩
Type Coercion
== vs ===, falsy values, and typeof edge cases.

JavaScript Masterclass Guides

Deep dives into tricky concepts to help you ace your interviews.

Top 10 JavaScript Challenges

Start here — these are the shots developers get wrong the most.

Get the Daily JavaScript Shot in Your Inbox

One JavaScript challenge every morning. No fluff, no newsletter filler. Just the shot and the explanation.

📫 No spam. Unsubscribe any time.

All JavaScript Challenges (67)

Every JavaScript shot ever published on CodeShot.

1 JavaScript Proxy — What does this print? 2 JavaScript Default Parameters — What is the Output? 3 JavaScript Typeof — What is Logged? 4 JavaScript This Keyword — What Does This Output? 5 JavaScript Inheritance — What Does This Output? 6 JavaScript Equality — Are == and === Interchangeable? 7 JavaScript Async/Await — Separate Thread or Event Loop? 8 JS JSON Methods — Can They Handle All Values? 9 JavaScript Scope — Does var create a new variable in loops? 10 JS Arrays vs Objects — True or False? 11 JavaScript Event Loop — Single-Threaded or Not? 12 JavaScript const — Does it prevent variable change? 13 JavaScript Equality — == vs ===: Which one wins? 14 JavaScript Async Error Handling — .catch() vs try/catch? 15 JavaScript String to Number — Which Method is Better? 16 JavaScript Object Properties — Which Check is Better? 17 JavaScript Async/Await — Sequential vs Parallel? 18 JavaScript Array Checking — Which Method is Better? 19 JavaScript Array Cloning — Which Approach is Correct? 20 JavaScript Sets — What Does This Output? 21 JavaScript This Keyword — What does this output? 22 JavaScript Destructuring — What is logged? 23 JavaScript Rest Properties — What does this output? 24 JavaScript Event Loop — What is the Output? 25 JavaScript Template Literals — What is logged? 26 JavaScript Promises — What Does This Output? 27 JavaScript Try...Finally — Which Value is Returned? 28 JavaScript Map vs WeakMap — What is the Output? 29 JavaScript Object Spread — What is the Final Output? 30 JavaScript Object Deletion — What Happens Here? 31 JavaScript Promises — What is the Final Output? 32 JavaScript Hoisting — Can You Call This Function? 33 JavaScript Arrays — What happens at a non-existent index? 34 JavaScript Array.sort() — Why is the Order Wrong? 35 JavaScript Event Listeners — Spot the Memory Leak Bug 36 JavaScript Sets — Can You Spot the Bug? 37 JavaScript Comparison Operators — Spot the Bug! 38 JavaScript Async/Await — Spot the Bug! 39 JavaScript Timers — Spot the Bug: setInterval vs setTimeout 40 JavaScript Array Map — Why is this console.log ignored? 41 JavaScript Type Coercion — What does this output? 42 JavaScript Closures — What Gets Logged? 43 JavaScript Array.indexOf — What does this print? 44 JavaScript Truthy & Falsy — What is the Output? 45 JavaScript Object.freeze — What gets logged? 46 JavaScript Type Coercion — What does this output? 47 JavaScript Type Coercion — What does this print? 48 JS Generator Function - What does next().value print twice? 49 JavaScript Map Size 50 JavaScript Nullish Coalescing 51 JavaScript Array Method - Unraveling Depth 52 JS Closure - What gets logged? 53 javascript Variable Shadowing 54 JavaScript String Concatenation 55 JavaScript Default Parameters 56 JavaScript Equality - What's the Default Value? 57 JavaScript Closures - What gets logged in a closure? 58 JavaScript Truthy Values 59 JS Conditional Operators 60 JavaScript NaN Type 61 JavaScript Mutable Reference Error 62 JavaScript Giant Numbers 63 JavaScript + Empty Array + Object 64 JavaScript Array Concatenation 65 JavaScript Timers: What GetsLogged? 66 JavaScript Float Precision Issue 67 JavaScript Null Type Inference