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

SV: [jslint] Re: Wrapping assignment in extra parentheses no longer working.

Expand Messages
  • Jakob Kruse
    And of course, if the intention was to include the first element of the linked list, the jslint safe version could be: // initialize a while (a) { // use a a =
    Message 1 of 1 , Jan 31, 2011
    View Source
    • 0 Attachment
      And of course, if the intention was to include the first element of the linked list, the jslint safe version could be:

      // initialize a
      while (a) {
      // use a
      a = a.next;
      }

      This being the more common scenario (compared to skipping the first element) is probably part of the reason why jslint frowns on “while (a = a.next)”.

      /Jakob

      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.