T
20
c/coding-for-beginnersellis.felixellis.felix3h agoProlific Poster

Spent 4 hours debugging a missing semicolon last night

Was working on a simple JavaScript project. A to-do list app. Couldn't figure out why the add button did nothing. Checked my loops, my functions, everything. Finally saw it. Missed a semicolon right before the event listener. Four hours. Has anyone else spent an embarrassing amount of time on something that tiny?
2 comments

Log in to join the discussion

Log In
2 Comments
abby_singh
I mean, is it really that tiny though? Semicolons matter in JavaScript, they literally tell the parser where one statement ends and another begins.
3
christopher903
Oh yeah, drove me crazy til I just started adding them everywhere out of habit.
1