💡
6
c/coding-for-beginners•piper779piper779•7d ago

Spent 3 hours debugging a single semicolon yesterday

I was working on a basic JavaScript project for my class and kept getting this weird error. Turns out I put a semicolon after an if statement condition, which just ended the line early and made the block always run. Has anyone else chased their tail for this long over something that tiny?
3 comments

Log in to join the discussion

Log In
3 Comments
hannah400
hannah4007d ago
It's always the tiny stuff, right? One time I spent like two hours trying to figure out why my CSS wasn't working and it was just a missing curly brace in a media query. Made me want to throw my laptop out the window.
4
ray_martinez82
I mean yeah it's annoying but two hours? You gotta be using a linter or an editor that highlights missing braces by now. That's like rookie mistakes.
4
tarabell
tarabell6d ago
Honestly @hannah400, I think a missing semicolon or curly brace is the most common CSS bug out there. Ngl, those tiny syntax errors make you feel like the code is gaslighting you on purpose.
3