5 ms·
I never actually type semicolons in my JavaScript / TypeScript. In work projects, my IDE adds them for me thanks to the linter. In personal projects, I just lea
by stack_framer 6mo ago
I never actually type semicolons in my JavaScript / TypeScript. In work projects, my IDE adds them for me thanks to the linter. In personal projects, I just leave them out (I don't use a linter, so my IDE does not add them), and I've never had a problem. Not even once.
Semicolon FUD is for the birds.
- jfengel 6mo agoI occasionally run into problems with JS weird parsing rules. My favorite is: return x Which does not return. It returns undefined. Typescript helps a lot with that. A linter will probably flag it as well. Still, JS went way out of its way to accept just about anything, whether it makes sense or not.
- galaxyLogic 6mo agoThat is what I lament too. So I've started to use the comma-operator to make sure my return statements don't care about line-breaks. I often write: return 0, x; I find this a mildly amusing discovery for myself because it took me a long time to figure out a useful use for the comma-operator.
- ProllyInfamous 6mo agoCormack McCarthy proved to me that when structured correctly conversive language does not need any quotation marks (while remaining entirely comprehensible). But " " still exist (for us/mere mortals) because few can write so clearly. I know nothing about coding (beyond changing others' variables to fit my installation), but would imagine this parallels many coding environments (e.g. yours).