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

956Re: [jslint] Re: Variable x was used before it was declared.

Expand Messages
  • Toby Maxwell-Lyte
    Oct 2, 2009
    • 0 Attachment
      2009/10/2 Douglas Crockford <douglas@...>:
      > --- In jslint_com@yahoogroups.com, Toby Maxwell-Lyte <toby.maxwelllyte@...> wrote:
      >
      >> Thanks, it just seems logical to have constants at the top of the
      >> file.
      >
      > They aren't constants. They are mutable properties of a function.
      >
      >> What is the motivation behind this rule?
      >
      > Variables should be declared before they are used.
      > The function statement is a variable declaration.
      >

      Thanks for the explanations gents.
    • Show all 9 messages in this topic