T
22

Spent 3 hours debugging a missing semicolon in JavaScript last night

I was following a tutorial on making a simple to-do list app and the code just would not run. Console kept giving me some vague error about an unexpected token. After staring at it forever, I finally noticed I forgot one semicolon at the end of a line in a for loop. Fixed it in two seconds. Kind of humbling how one tiny thing can break everything. Anyone else spend way too long on something this simple?
2 comments

Log in to join the discussion

Log In
2 Comments
the_sandra
the_sandra23d ago
Nothing humbles you quite like a single missing character after three hours of frustration.
9
pat_hart
pat_hart22d ago
Call it out for what it really is. It's almost never just one missing character. It's usually a missing semicolon or a bracket out of place in a language that doesn't even tell you where the error is until you've run the thing three times. Then you finally spot it and your brain just goes into standby mode for the rest of the day.
3