Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
atheist99832y
-
By avoiding semicolons, you cause readability nightmares and risk totally avoidable and hard to troubleshoot bugs.
Just because you're allowed to skip semicolons, it doesn't make it a good practice. -
KDSBest7712ySince I don't use an editor plugin. I don't feel called out. For me the semicolons are essential but all semicolons in my code are typed by hand. It's a habit.
-
Because js code without semi colons is error prone and unclear so it's better to add them some way than not at all
SOURCE
const x = 1
(1+x).toString()
OUTPUT
const x = 1(1+x).toString();
SOURCE
return
{
x:1
}
OUTPUT
return;
{x:1};
FYI: this last example is a caveat - it would return the obj if the { was placed on the same line as the return.
Related Rants
If you use a fucking editor plugin to insert semicolons for you, why even insert them in the first place? They're fucking optional, goddamn it
rant
vscode
js