Re: [jslint] Re: Variable x was used before it was declared.
- 2009/10/2 Douglas Crockford <douglas@...>:
> --- In firstname.lastname@example.org, Toby Maxwell-Lyte <toby.maxwelllyte@...> wrote:Thanks for the explanations gents.
>> Thanks, it just seems logical to have constants at the top of the
> 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.