JavaScript Modulo Pitfall (and how I use it to teach debugging)


Here is a project with excessive comments that I use to highlight some important concepts:

  • Cycling over a list using modulo and how JavaScript’s implementation can cause issues
  • Using abstraction with single statement functions for clarity and how it helps debugging
  • Using console.log for debugging
  • Bulk comment/uncomment (w/ nested comments)
  • Placeholder text and other test data
  • Paying attention to warning.