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

Why does my Array usage halt jslint

Expand Messages
  • TIM FULCHER
    Hi I m running a slightly modified jslint over a bunch of our javascript files and have noticed that if our code defines an array such as var a = new
    Message 1 of 2 , Apr 21, 2010
    • 0 Attachment
      Hi

      I'm running a slightly modified jslint over a bunch of our javascript files and have noticed that if our code defines an array such as

      var a = new Array("one","two","three");

      Then jslint indicates the error but then terminates further processing with a
      " reason=Stopping, unable to continue. (49% scanned) "    message

      I can appreciate the array definition could be done better but I'm a bit perplexed why lint terminates because of it ???
      My modifications don't alter the internals of jslint, I just defined a few extra globals.
      In fact when I try a similar test on www.jslint.com the same error shows.

      thanks

      Tim


      [Non-text portions of this message have been removed]
    • Douglas Crockford
      ... var a = [ one , two , three ]; Smaller, faster, better. Just fix your code.
      Message 2 of 2 , Apr 21, 2010
      • 0 Attachment
        --- In jslint_com@yahoogroups.com, TIM FULCHER <tfulcher@...> wrote:

        > I'm running a slightly modified jslint over a bunch of our javascript files and have noticed that if our code defines an array such as
        >
        > var a = new Array("one","two","three");
        >
        > Then jslint indicates the error but then terminates further processing with a
        > " reason=Stopping, unable to continue. (49% scanned) "    message
        >
        > I can appreciate the array definition could be done better but I'm a bit perplexed why lint terminates because of it ???


        var a = ["one", "two", "three"];

        Smaller, faster, better.

        Just fix your code.
      Your message has been successfully submitted and would be delivered to recipients shortly.