Re: Mysterious and confusing error message on encountering destructuring assignment
- View Source--- In firstname.lastname@example.org, "silver_7402" <silver_7402@...> wrote:
>Thanks. JSLint now reports "Bad assignment."
> If a script is entered into JSLint.com containing a destructuring assignment, JSLint gives a strange error message that has little or nothing to do with the actual cause of the error, then dies -- i.e. doesn't produce any more results. The message appears to indicate a problem in the script at that position, but is I think actually an error message from JSLint itself.
> I guess I'd like to see one of two things: either JSLint supporting this assignment syntax (nice, but will take a while, probably); or JSLint at any rate not crashing on it.
> [p2, p1] = [p1, p2 + p1];
- View Source--- In email@example.com, "douglascrockford" <douglas@...> wrote:
> Thanks. JSLint now reports "Bad assignment."Ah, much better. Now I can actually check the rest of the script.... Many thanks.