#6 Semicolons - Lessons Learned While Reading "Effective Javascript"

In Javascript, semicolons are optional. However, for the sake of simplicity, it's best to include them. Furthermore, when always including semicolons, it's important to remember that the following statements may not have a newline before their arguments: (JS will implicitely insert a semicolon)

  • ++
  • --
  • break
  • continue
  • return
  • throw