Javascript best practices

Comments

  • Use comments before code

  • Use multi-line comment as:

/** Multi-line
      comment
      comment
      comment */

or

/** Multi-line
  * comment
  * comment
  * comment
  * comment
  */

  • Use single line comment as:

    // Single line comment