Someone had to do this before the riots started.

you are viewing a single comment's thread
view the rest of the comments
[–] 2 points 2 years ago

This, unfortunately, means that semicolons are often inserted in places where you were not expecting them

example:

()=>{
  return {k:"v"}; // returns the object
}
()=>{
  return      // returns undefined 
    {k:"v"};  // unreachable 
}

so the advice is to always include them manually yourself so that you are never unpleasantly surprised.

The example will be unpleasantly surprising, no matter where you put semicolons.

  • source
  • parent