Hallo,
"Declare the variable before giving it a value that depends on the
same variable".Als Antwort auf die Feststellung, dass der Fehler inkonsitent wäre.
Die genaue Erklärung zum Warum der Fehlermeldung liefert er dort auch:
--- In jslint_com@yahoogroups.com, "Douglas Crockford" <douglas@> wrote:
There are some cases where it is troublesome to use a variable while it is
being initialized, such as
var x = x + 1;
JSLint is not able to determine which cases are troublesome and which are
useful, so it warns on all cases.
Der letzte Satz erklärt wohl alles.
Gruß, Don P