H
18

Spent 3 hours yesterday because I forgot a single semicolon

I was trying to get a simple JavaScript function to run, and it just kept failing. I checked the logic, the variable names, everything I could think of. Turns out I missed a semicolon on line 17. The error message was about something else entirely, so I went down a huge rabbit hole. Has anyone else had a tiny syntax error waste their whole evening?
2 comments

Log in to join the discussion

Log In
2 Comments
the_luna
the_luna2d ago
Ugh, the "error message was about something else entirely" part is so real. I used to think I could just skim the error and fix the obvious thing. Then I spent a whole afternoon on a Python script because it said there was an unclosed bracket. I re-wrote entire sections. It was actually a missing comma in a list way earlier that messed up the whole parse. Now I just start from the line it mentions and check every single character before and after, no matter what it says.
5
loganhart
loganhart2d ago
Yeah that missing comma thing @the_luna is the worst. The parser just gets lost and points to a random spot later. Now I always check the actual line it shows, then scan backwards for any simple syntax errors first.
6