R
18

Vent: Spent 4 hours tracking down a missing semicolon

Last Tuesday I was working on a simple JavaScript project for a course I'm taking. I had this one function that kept throwing an error, and I could not figure out why for the life of me. After 4 hours of staring at the code, checking every bracket and variable name, I found it. I was missing one semicolon at the end of a line inside a loop. The whole thing broke because of a tiny punctuation mark. Has anyone else wasted a whole evening on something this stupid?
2 comments

Log in to join the discussion

Log In
2 Comments
blairm35
blairm353d ago
Oh man, the missing semicolon hunt is a rite of passage. It's always the tiny stuff that eats your whole night. If it makes you feel better, I once spent two hours debugging a function before realizing I wrote "lenght" instead of "length".
1
logan_thomas87
Ha! @blairm35 that's brutal but honestly I bet we've all been there. I once spent a whole afternoon tracking down why my form wasn't submitting and it was just a capital letter in the wrong spot. Makes me wonder what other dumb mistakes are lurking in old code we wrote years ago.
1