🎙️
23

Spent 3 hours debugging because I forgot a single semicolon in my JavaScript

I was working on a small project to make a button change colors, and my code just wouldn't run. I checked the logic, the function names, everything I could think of. Turns out, I missed a semicolon on line 17, and the error message in the console was not helpful at all. Has anyone else lost a huge chunk of time to a tiny syntax error like that?
3 comments

Log in to join the discussion

Log In
3 Comments
keith_rivera19
Honestly three hours seems like a lot for one semicolon. You gotta learn to read the actual error messages, they usually point you close to the problem.
3
finley_price24
Read the error messages" is easy to say. What do you do when they just point to a blank line?
6
taylor_miller10
Check the lines around it. The error might be on a different line than it says. Sometimes the compiler just gets confused.
2