Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
js named functions
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbe committed May 15, 2014
1 parent 75e0052 commit fb74dc2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions js-style.rst
Expand Up @@ -134,12 +134,11 @@ Functions
Named Functions
~~~~~~~~~~~~~~~

**Always** name functions, even if assigned to another variable or property.
This improves error stacks when debugging.
Not necessary.

No space between name and opening paren. Space between closing paren and brace::

var method = function doSomething(argOne, argTwo) {
var method = function(argOne, argTwo) {

}

Expand Down

0 comments on commit fb74dc2

Please sign in to comment.