Most Powerful Open Source ERP

Guideline JavaScript Opening Brace Is On Line Of Current Statement

Consistent coding patterns.
  • Last Update:2017-04-05
  • Version:001
  • Language:en

JavaScript Opening Brace Is On Line Of Current Statement

Always put the opening brace on the same line as the previous statement.

Good Example:

function func () {
  return {
    "name": "Batman"
  };
}

Bad Example:

function func() {
  return
  {
    "name": "Batman"
  };
}