=

JSLint möchte keine Zuweisung im Bedingungsteil einer if- oder while-Anweisung sehen. Das liegt daran, dass mit

if (a = b) {
    ...
}

wohl eher

if (a == b) {
    ...
}

gemeint ist. Wollen Sie tatsächlich etwas zuweisen, stellen Sie es in ein zusätzliches Paar Klammern:

if ((a = b)) {
    ...
}

Get Das Beste an JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.