#30DaysOfDebugging
30 Days of Debugging: JavaScript
One bug a day, for 30 days. Each day is a short piece of JavaScript that almost works, the symptom it causes, and tests that pass once you have fixed it. It takes most people five to ten minutes.
The first three weeks are the bugs every beginner meets. The last stretch is medium level: boundaries, rounding, shared state and an interview problem. Go faster if you like; the days are a pace, not a lock.
Your progress
0 of 30 days
- 1Day 1 · Capitalize turns "debug" into "Ddebug"
- 2Day 2 · isEven says 4 is not even
- 3Day 3 · Free shipping not given at exactly 50
- 4Day 4 · First 3 items comes back with only 2
- 5Day 5 · Adding up [1, 2, 3] gives NaN
- 6Day 6 · Playlist shows undefined as the last song
- 7Day 7 · Number sort puts 10 before 2
- 8Day 8 · Adding shipping gives a list of undefined
- 9Day 9 · Validator never finds the negative number
- 10Day 10 · First item name crashes on an empty list
- 11Day 11 · Doubling until past a limit never stops
- 12Day 12 · Dashboard crashes for a user with no address
- 13Day 13 · getName gives back undefined
- 14Day 14 · Cart total shows "01020" instead of 30
- 15Day 15 · Going from 100 to 150 shows -50%Medium
- 16Day 16 · Last 2 items comes back with 3Medium
- 17Day 17 · Joining words leaves a dash at the endMedium
- 18Day 18 · Removing dashes removes only the first oneMedium
- 19Day 19 · Zero counter also counts "" and falseMedium
- 20Day 20 · Setting retries to 0 turns them back onMedium
- 21Day 21 · Price lookup crashes for an unknown itemMedium
- 22Day 22 · Every date shows last monthMedium
- 23Day 23 · 1.5 + 2.5 comes out as 3Medium
- 24Day 24 · map(parseInt) turns "10" into NaN and 2Medium
- 25Day 25 · 0.1 + 0.2 gives 0.30000000000000004Medium
- 26Day 26 · Grouping words keeps only one per groupMedium
- 27Day 27 · Adding a fee crashes before the fee existsMedium
- 28Day 28 · Doubling after a delay returns undefinedMedium
- 29Day 29 · AI Attempt: Remove all occurrencesMedium
- 30Day 30 · Names list is full of promises, not textMedium
How it works
- Everything runs in your browser. No install, no account needed to start.
- Sign in to keep your progress across devices. Without an account it is remembered in this browser only.
- Finish all 30 while signed in and you can claim the free 30 Days of Debugging · JavaScript certificate, with a verification link for LinkedIn.
- Posting your progress? Use #30DaysOfDebugging. The share button after each fix writes the post for you.
Prefer Python? 30 Days of Debugging: Python