JavaScript:SpiderMonkey:C Coding Style: Difference between revisions

Jump to navigation Jump to search
Line 5: Line 5:
* But static native methods of JS objects have lowercase, underscore-separated or intercaps names, e.g., str_indexOf.
* But static native methods of JS objects have lowercase, underscore-separated or intercaps names, e.g., str_indexOf.
* Function return types are on a separate line preceding the function name.
* Function return types are on a separate line preceding the function name.
  void DoThis() {        // bad
* Function braces go on the line following the function name.
  void DoThis()           // bad
{
     ...
     ...
  }
  }
  void
  void
  DoThis() {              // OK
  DoThis()               // OK
{
     ...
     ...
  }
  }
118

edits

Navigation menu