B
12

Spent 6 hours debugging a missing semicolon in JavaScript

Started learning JavaScript last week and spent an entire Saturday trying to figure out why my simple function wouldn't run. Turns out I forgot a single semicolon after a line. Six hours for one tiny character. Has anyone else wasted a whole day on something this dumb when you were starting out?
3 comments

Log in to join the discussion

Log In
3 Comments
taylor12
taylor121mo ago
Nah, I actually think that six hours was time well spent. You will never forget a semicolon again. I did the same thing with a missing curly brace in my first week coding and I still check for those before anything else. Learning to spot those tiny mistakes early on saves way more time later.
5
xenaf51
xenaf5129d ago
Good heavens, six hours? That's a whole workday just staring at a missing semicolon. I can't even imagine the patience that took. I guess I get the point about the lesson really sticking with you, but I would have been pulling my hair out by hour three. You must have been absolutely exhausted by the time you finally spotted it.
7
the_jennifer
Yeah, I don't know @taylor12, I think six hours for a semicolon is a bit much. You probably could have just run it through a linter and found it in two minutes.
-1