--- In

jslint_com@yahoogroups.com, "m_blasz" <blasz_2000@...> wrote:

>

> I have 2 questions.

>

> 1. Is there a JSLint option to tolerate variable assignments in if statements? If so, which one?

>

No.

There are ways around it, if you really must:

var a, b;

if (a === b) { a = 1; } // OK

if (a = b) { a = 1; } // NOT OK

if (!!(a = b)) { a = 1; } // OK

> 2. Why should we 'Move the invocation into the parens that contain the function'?

FRED = (function() { .... }());

looks clearer than

FRED = (function() { .... })();