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.

110 Total Shots
31 Junior
46 Mid-Level
33 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 (110)

Every JavaScript shot ever published on CodeShot.

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