R
1

Spent 4 hours debugging a missing semicolon in JavaScript

I was working on a simple calculator project for my first portfolio site. The code looked perfect to me but nothing would run. I checked my loops, my functions, even rewrote half the logic. Turned out I forgot a semicolon at the end of a variable declaration on line 12. That tiny thing cost me 4 hours of staring at the same 50 lines of code. My buddy who's been coding for years just laughed and said it happens to everyone. Has anyone else had a bug like that where you felt dumb after finding it?
2 comments

Log in to join the discussion

Log In
2 Comments
john_murphy
Wait wait, 4 hours?
5
aaronf40
aaronf404d ago
Used to think semicolons were optional. Changed my mind real quick.
3