--- In jslint_com@yahoogroups.com, "Douglas Crockford" <douglas@...> wrote:
>
> The thing that JSLint did not like was the use of an assignment as an
expression. It will accept
>
> this[prop] = (this[prop] === val1) ? val2 :
> (this[prop] === val2) ? val1 : this[prop];
> return this[prop];
>
> or
>
> return (this[prop] = (this[prop] === val1) ? val2 :
> (this[prop] === val2) ? val1 : this[pro
>
Oh, I see! So this works:
return (this[prop] = (this[prop] === val1) ? val2 :
(this[prop] === val2) ? val1 : this[prop]);
Thanks for your help. Nice to know that JSLint handles nested ?: operators.