10
Spent 3 hours debugging a missing semicolon in JavaScript and wanted to throw my laptop
Friday night I was following a beginner tutorial for a weather app. Had this one line that kept breaking everything. Checked every curly brace, every variable name, even retyped the whole function twice. Turned out I just forgot a semicolon at the end of a line. Three hours for that. Anyone else waste way too much time on something this dumb?
3 comments
Log in to join the discussion
Log In3 Comments
murphy.blair1mo ago
Lol I once spent two hours debugging a typo where I wrote "lenght" instead of "length" in a for loop. JavaScript really loves to punish us for the smallest mistakes.
4
mark3611mo agoTop Commenter
The property name typo is the worst because your brain just reads what it expects to see every time you scan the code. I've learned to just copy and paste those built-in strings now instead of typing them out manually. JavaScript is flexible about a lot of things but dead silent on that one little misspelling.
2
rose_cooper1mo ago
Oh man, the semicolon curse strikes again (classic JavaScript, am I right?). I once spent an entire Saturday afternoon tracking down a bug that turned out to be a missing comma inside an object literal. Literally just one tiny comma. I even called my friend over to look at it and he spotted it in about five seconds. Felt like a real genius that day. At least you weren't using PHP, where missing a semicolon gives you a white screen of death that tells you absolutely nothing useful.
1