Hyper Open Edge Cloud

Guideline A Non Anonymous JavaScript Method Must Be Declared Before Use

Jslint will throw on this, too.
  • Last Update:2017-04-05
  • Version:001
  • Language:en

A Non Anonymous JavaScript Method Must Be Declared Before Use

Non anonymous functions should be declared before use.

Good Example:

// [...]
function namedFunction() {
  return;
}
return {
  "namedFunction": namedFunction
};

Bad Example:

// [...]
return {
  "namedFunction": function namedFunction() {
    return;
  }
};