Your First 5 Bugs
The gentlest on-ramp to debugging
Five beginner-friendly bugs with clear symptoms and satisfying fixes. The best place to start if you are new to debugging.
Your Progress
0 of 5 completed
Challenges in this collection
- 1
Sum from 1 to n leaves out n
sum_range(n) adds up every whole number from 1 to n. Example: sum_range(5) → 15 (1 + 2 + 3 + 4 + 5).
pythoneasy - 2
isEven says 4 is not even
isEven(n) returns true when n is even and false when it is odd. Example: isEven(4) → true, isEven(3) → false.
javascripteasy - 3
Price label crashes on a number
format_price(amount) returns the amount with a dollar sign. Example: format_price(5) → "$5".
pythoneasy - 4
First 3 items comes back with only 2
firstChunk(arr, size) returns the first size items of the array. Example: firstChunk([1, 2, 3, 4, 5], 3) → [1, 2, 3].
javascripteasy - 5
Settings lookup crashes on a missing key
get_setting(config, key) returns the value for key, or "default" if the key is not there. Example: get_setting({"theme": "dark"}, "font") → "default".
pythoneasy
More collections to explore
Python Gotchas
Mutable default arguments, list.sort() returning None, and mutating a list while iterating over it.
JavaScript Type Coercion Traps
Accidental string concatenation, array sort ordering numbers alphabetically, and zero being falsely treated as missing.
The Off-By-One Gauntlet
Fencepost errors, inclusive vs exclusive slice bounds, and loops that step one position too far.
Async Nightmares
The asynchronous bugs that silently swallow data: un-awaited promises, forEach loops with async callbacks, and race conditions.
AI Code Comprehension
Simulate modern Code Comprehension rounds: classic coding questions written by an AI that pass the obvious test, but break on subtle edge cases.