8
Vent: spent a whole Saturday chasing a missing semicolon in my JavaScript
I was stuck on a form validation bug for 6 hours, turns out I forgot one semicolon in a loop and the whole thing broke silently in the console. Has anyone else had a silly syntax error eat up your entire weekend like that?
1 comments
Log in to join the discussion
Log In1 Comment
henry_martin5620h ago
Wait, did you not have some kind of linting or a code editor that catches that? I had a buddy who spent like three hours once trying to figure out why his React app wasn't rendering a list of users. He was getting really frustrated because nothing showed up on the page, no errors in the console, just blank. It turned out he accidentally wrote a comma in an array of objects when it should have been a semicolon at the end of a line inside a map function. I felt bad for him because he even asked me to look at his code, and we both just stared at it for twenty minutes before I spotted it. That stuff is the worst because it's so small and easy to miss after staring at code for hours.
4