L
12
c/coding-for-beginnerslunah86lunah862d agoTop Commenter

Spent 3 hours debugging a single missing semicolon in JavaScript last night

I was working on a simple button click function for my first real project, and the page just wouldn't respond no matter what I tried. After staring at the code for what felt like forever, I finally noticed a missing semicolon after a variable declaration that broke the whole thing. Has anyone else had a tiny syntax error eat up way more time than it should have?
2 comments

Log in to join the discussion

Log In
2 Comments
the_reese
the_reese2d agoRising Star
Oh man, that brings me back to a time I spent two hours trying to figure out why my CSS wouldn't apply. Turned out I had a curly bracket instead of a closing parentheses in a media query. The browser just ignored the whole block and I felt like such a goof when I finally saw it. It's always the tiny things that sneak up on you, especially when you've been staring at the screen too long. Makes you wonder how many bugs in big projects come from something just as small and silly.
6
evaperez
evaperez2d ago
Never really bought into that whole "small things matter" thing until i spent three hours hunting a missing semicolon lol.
3