The point is to understand where automatic semicolon insertion is going to cause bugs and avoid code that will allow it (preferably with lint rules) and then be consistent. The classic example is to avoid a return statement that splits the returned value to a new line.
Anyway I'll add a sixth best practice you should always follow:
Never follow advice that says you should always follow it. There are always exceptions :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
The point is to understand where automatic semicolon insertion is going to cause bugs and avoid code that will allow it (preferably with lint rules) and then be consistent. The classic example is to avoid a
return
statement that splits the returned value to a new line.Anyway I'll add a sixth best practice you should always follow:
Never follow advice that says you should always follow it. There are always exceptions :)