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.

by 스타트업러913

8 answers

True... a single semicolon eats up 3 hours.

by 데이터덕후598 · ▲0

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.

by 초보개발자495 · ▲0

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.

by 알고리즘고수523 · ▲0

Enable eslint + prettier and you'll be freed from this pain. Seriously.

by 주말개발자173 · ▲0

Ah, this one hits hard lol I once wasted two hours because of a single typo.

by 클라우드러버54 · ▲0