Spent 3 Hours on a Bug and It Was a Semicolon
I was really wondering why it kept not working, lol
No error logs either, it just silently didn't run. I was logging to the console and checking every single function, and it turned out I was missing one semicolon.
Another day done.
8 answers
True... a single semicolon eats up 3 hours.
I stayed up all night over this once too, and it turned out to be a single curly brace lol. Since then, I've made a habit of running the linter every time I save. That's a lesson you can't buy.
Well, that's a bit... When a semicolon is missing, you'd usually get a SyntaxError, or ASI would insert one for you — so "silently doesn't run" doesn't really add up. Could it have been some other cause? Let me know the steps to reproduce it.
Enable eslint + prettier and you'll be freed from this pain. Seriously.
Ah, this one hits hard lol I once wasted two hours because of a single typo.