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

Re: JSLint, unary +, and array subscripts

Expand Messages
  • douglascrockford
    ... Thanks. Please try it now.
    Message 1 of 4 , Sep 18, 2012
    View Source
    • 0 Attachment
      --- In jslint_com@yahoogroups.com, Josh Jordan <therealjoshjordan@...> wrote:
      >
      > I expect jslint to accept the following two-line code snippet, but
      > instead it gives the error "Unexpected '['". What am I doing wrong?
      >
      > ===JSLINT INPUT===
      > var a = ["1"], b;
      > b = +a[0];
      >
      > ===JSLINT OUTPUT===
      > Unexpected '['. (line 2, character 7)
      > b = +a[0];


      Thanks. Please try it now.
    Your message has been successfully submitted and would be delivered to recipients shortly.