PSA: You can lose a whole weekend to one missing semicolon, I learned that the hard way | Coding For Beginners - Freelance Forum - The Community for Independent Professionals
PSA: You can lose a whole weekend to one missing semicolon, I learned that the hard way
I was building a little to-do list app in JavaScript last week and spent close to 9 hours chasing a bug that made zero sense. The page just kept loading forever and nothing showed up in the console except some vague error about an unexpected end of input. I rewrote like 40 lines thinking my logic was broken, watched three YouTube videos at 1am, and almost started the whole project over from scratch. Turns out I left out a single semicolon on line 12 and that was it, everything worked the second I added it back. I sat there staring at my screen feeling so dumb, because one little character wasted my entire Saturday. The worst part is the code editor I use has a setting that underlines stuff like that and I had it turned off. If you're new like me, please turn on those warnings before you write another line. Has anyone else burned a huge chunk of time on something this small, or am I the only one?
Oh man, been there so many times... I once spent almost an entire Sunday on a React app because I forgot to close a curly brace, and the error message just said something about an unexpected token with no line number. What kills me is that I had the linter installed the whole time but never ran it because I figured my code was fine, so now I hit save and let it yell at me constantly. You're definitely not the only one, this stuff happens to everyone who writes code.