Re: [jslint] Re: var a = var b = foo();
- 2008/12/16 Douglas Crockford <douglas@...>:
> --- In firstname.lastname@example.org, "Daniel Cassidy" <mail@...> wrote:Uhh... sorry. It is of course a syntax error.
>> JSLint forbids the following form:
>> var a = var b = foo(); // Expected an identifier and instead saw 'var'.
>> Is this intentional?
> Of course.
Chalk that one up to temporary insanity on my part. I was thinking of
another language where "var b" is an expression, and so returns a
value (as well as declaring a variable).