BugHunt

#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

Start Day 1 →
  1. 1Day 1 · Words start with duplicate letters
  2. 2Day 2 · Validation returning reversed results
  3. 3Day 3 · Shipping discount applied incorrectly
  4. 4Day 4 · First slice is missing data
  5. 5Day 5 · Array iteration throwing out of bounds
  6. 6Day 6 · Playlist shows undefined as the last song
  7. 7Day 7 · Number sort puts 10 before 2
  8. 8Day 8 · Price list full of undefined
  9. 9Day 9 · Validator never finds the negative number
  10. 10Day 10 · Error when fetching names from empty groups
  11. 11Day 11 · Multiplier running forever
  12. 12Day 12 · Dashboard crashing on missing data
  13. 13Day 13 · Helper function returning undefined
  14. 14Day 14 · Cart total comes out as gibberish
  15. 15Day 15 · Math formula returning negative resultsMedium
  16. 16Day 16 · List truncator missing the final itemMedium
  17. 17Day 17 · Formatter appending extra charactersMedium
  18. 18Day 18 · Formatter leaving unwanted charactersMedium
  19. 19Day 19 · Validation passing empty stringsMedium
  20. 20Day 20 · Zero values being ignoredMedium
  21. 21Day 21 · Function crashing when item not foundMedium
  22. 22Day 22 · Every date shows last monthMedium
  23. 23Day 23 · Number conversion rounding incorrectlyMedium
  24. 24Day 24 · Mapping strings to numbersMedium
  25. 25Day 25 · Financial totals slightly inaccurateMedium
  26. 26Day 26 · Data groups overwriting each otherMedium
  27. 27Day 27 · ReferenceError crashing the appMedium
  28. 28Day 28 · Delayed function returning undefinedMedium
  29. 29Day 29 · AI Attempt: Remove all occurrencesMedium
  30. 30Day 30 · Array contains pending operationsMedium

How it works

Prefer Python? 30 Days of Debugging: Python