2

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

Comments
  • 6
    Because carriage returns aren't statement terminators.

    https://freecodecamp.org/news/...
  • 2
    Code consistency.
  • 1
    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.
  • 1
    Since 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.
  • 0
    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.
Add Comment