
The majority of developers put semicolons.

Otherwise, it’s best to use semicolons to avoid possible pitfalls. If you’re an experienced JavaScript programmer, you may choose a no-semicolon code style like StandardJS. See more about that in the chapter Code structure. In JavaScript, though, there are cases where a line break is not interpreted as a semicolon, leaving the code vulnerable to errors. There are languages where a semicolon is truly optional and it is rarely used.

There should not be more than nine lines of code without a vertical indentation.Ī semicolon should be present after each statement, even if it could possibly be skipped.

Insert an extra newline where it helps to make the code more readable.
