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

349Feature request: disable message about assignment-in-while cond

Expand Messages
  • M. Lorton
    Jan 9, 2009
      Right now, the code

      var a;
      while (a = f()) {
      ...

      causes JSLint to complain -- which is right in many cases: you are
      doing an assignment when you meant to do a comparison.

      But what if you meant to do the assignment? I would like to be able
      to indicate in some way to JSLint that (Pee-Wee Herman voice) "I meant
      to do that."
    • Show all 2 messages in this topic