Space after function name is wrong?

According to Crockford,

For named functions, DO NOT insert space between function name and parentheses:

function doStuff() {
  //stuff here
}

For anonymous functions, DO insert space between function keyword and parentheses:

function () {
  //stuff here
}

Leave a Comment