D
15

Spent 5 hours debugging a missing semicolon in JavaScript

I kept getting this weird error in my code and couldn't figure out why. Turns out I forgot a semicolon in a for loop and it broke everything. Took me 5 hours to find that one tiny mistake. Has anyone else wasted a whole afternoon on something this small?
2 comments

Log in to join the discussion

Log In
2 Comments
emma768
emma7681mo ago
Oh man, I used to roll my eyes at people who blamed semicolons cause I figured they just weren't careful enough. But then last week I spent three whole hours tracking down a bug that was literally just one missing semicolon in a React useEffect dependency array. It's honestly humbling how one tiny character can totally waste your afternoon.
6
lee733
lee7331mo ago
THREE HOURS on a missing semicolon in a useEffect? That's BRUTAL. I would've probably thrown my laptop out the window after the first hour.
3