Loading ...
Sorry, an error occurred while loading the content.

Re: strict whitespace

Expand Messages
  • Douglas Crockford
    ... Fixed. Thanks. ... To be clear, an anonymous function is a function without a name, not a function named function.
    Message 1 of 2 , May 24, 2008
    • 0 Attachment
      --- In jslint_com@yahoogroups.com, "Kai" <blafasel@...> wrote:
      >
      > Hello!
      >
      > A few -more or less- philosophical questions regarding strict whitespace
      > option:
      >
      > A) �Comment:
      >
      > JSLint doesn't like comments within function arg parenthesis:
      > function�foo(bar/*,baz*/) {}

      Fixed. Thanks.

      > B)� Space before parenthesis
      >
      > JSLint expects this:
      >
      > el.onclick = function () { //there has to be a space before parenthesis
      > here... (1)
      > function foo() {} // ...but not here (2)
      >
      > but doesn't like that:
      >
      > function foo () { �//=> Unexpected space after 'foo2'. (3)
      > el.onclick = function() { // => Missing space after 'function'. (4)
      >
      > why is that? �just "because that's how it is" or is there a reason?
      > shouldn't it�be either with�or without space?

      To be clear, an anonymous function is a function without a name, not a
      function named function.
    Your message has been successfully submitted and would be delivered to recipients shortly.