T
19

Spent 2 hours debugging a missing semicolon in JavaScript and it broke my whole morning

I was working on a simple calculator thing for my first real project on Tuesday. Everything looked fine in my head, but the console kept spitting out this error about something undefined. I checked variables, googled the error, even rewrote a whole section of code. Turns out I forgot a semicolon after a function call on line 47. Two hours gone for one tiny character. What I learned is that I need to slow down and actually read my syntax errors instead of guessing what's wrong. Has anyone else wasted a ton of time on something this dumb before?
2 comments

Log in to join the discussion

Log In
2 Comments
evand65
evand655d agoMost Upvoted
Oh man, been there. I spent an entire afternoon once because I had a capital letter wrong in a CSS class name. Just one character off and nothing worked. It's always the dumb little stuff that eats up your time. You learn to check the tiny things first after a few of those.
5
miller.paul
It's the same as losing your keys when you're already running late.
2