Loading ...
Sorry, an error occurred while loading the content.

903Re: Mysterious and confusing error message on encountering destructuring assignment

Expand Messages
  • douglascrockford
    Sep 10, 2009
      --- In jslint_com@yahoogroups.com, "silver_7402" <silver_7402@...> wrote:
      >
      > If a script is entered into JSLint.com[1] containing a destructuring assignment[2], JSLint gives a strange error message[3] 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];


      Thanks. JSLint now reports "Bad assignment."
    • Show all 3 messages in this topic