3 ms·
Semicolons cannot save you: https://www.youtube.com/watch?v=Qlr-FGbhKaI https://www.youtube.com/watch?v=Qlr-FGbhKaI Gist: Adding semicolons won't help, because
by k__ 11y ago
Semicolons cannot save you: https://www.youtube.com/watch?v=Qlr-FGbhKaI https://www.youtube.com/watch?v=Qlr-FGbhKaI
Gist: Adding semicolons won't help, because you still have to know how JavaScript inserts them automatically to add them in the right places.
- __david__ 11y agoCorrect me if I'm wrong, but the only case you have to worry about is having "return" on the same line as the thing you want to return. And you have that problem whether or not you use semicolons in the rest of your code.
- k__ 11y agoThe blog post mentions, that starting a line with [ or ( can be dangerous too. But till hat example I didn't even know why this would make sense in the first place. I only use excessive parenthesis for math and store arrays, like the example, in constants that describe their purpose, so I guess I dodged a bullet there :)