Some of the most useful JavaScript lessons seem to come from bugs that initially look completely harmless.
Maybe a button works twice instead of once, an event listener gets attached multiple times, a value is unexpectedly undefined, or something behaves differently after navigating back to a page.
I’m curious about the small bugs that other developers have encountered that changed the way they write JavaScript.
What’s one bug you remember thinking:
“How can this possibly be happening?”
And what did you eventually discover was causing it?
Beginner mistakes are welcome too. Sometimes those are the most useful ones for other developers to learn from.