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.

87 Total Shots
24 Junior
37 Mid-Level
26 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 (87)

Every JavaScript shot ever published on CodeShot.

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