n
11

Just realized what semicolons actually do in JavaScript

I spent a whole evening in Denver staring at a loop that kept printing undefined, turns out I was missing a semicolon before a blank line and the parser read it as a function call. I always thought semicolons were just decoration, now I get why older devs lose it over them. Anyone else have that moment where one tiny character made you re-read a whole file three times?
0 comments

Log in to join the discussion

Log In
0 Comments

No comments yet

Be the first to share your thoughts on this discussion.