O
19

Rant: Spent 2 hours debugging a missing semicolon in my JavaScript

I was working on a little weather app project last night and couldn't figure out why my function kept breaking. Turned out I forgot a semicolon after a variable declaration, rookie stuff. Has anyone else spent way too long on a tiny syntax error like that?
2 comments

Log in to join the discussion

Log In
2 Comments
grant826
grant8261mo ago
Spending 2 hours on a missing semicolon is a luxury most devs don't have... honestly you should be grateful for the lesson. Semicolons are there for a reason and JavaScript engines are way too forgiving as it is. People who complain about this just refuse to use linters properly. If you'd set up ESLint from the start you'd catch it in half a second and move on. The real problem isn't the missing character, it's developers who fight against tooling that saves them time. You could have avoided all that frustration with ten minutes of setup work.
6
kelly.dylan
Remember last week when I spent an hour trying to figure out why my cat was sitting on my keyboard and it turned out she'd just disabled my wifi with one paw? Yeah, similar energy. Sometimes the simplest things take forever.
3