G
14

Spent 2 hours debugging a missing semicolon in JavaScript

I was working on a simple calculator project in my bedroom around midnight. Kept getting a syntax error on line 47, checked every bracket and variable name twice. Turns out I forgot a semicolon at the end of line 12, right where I was tired and rushing. Felt dumb but also relieved it wasn't something bigger. Has anyone else wasted this long on a single character glitch?
2 comments

Log in to join the discussion

Log In
2 Comments
blair_gibson78
Classic. The semicolon strikes again. JavaScript lets you get away with missing them most of the time, but one wrong line and boom, two hours gone. Pretty sure the universe just watches us lose sleep over a single character. At least you didn't chase a ghost bug for four hours like I did last week. Turned out I had an extra comma in an object.
-1
ben402
ben4029d ago
Wait, you're saying commas in objects can break stuff too? lol
8