T
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?
2 comments

Log in to join the discussion

Log In
2 Comments
henry_martin56
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
andrew_sanchez94
Oh man, I feel your pain! Had a similar thing happen where I was debugging a login flow for like 4 hours and it was just a single missing closing bracket in an if statement.
4