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

Re: [jslint] 'Unfiltered for' checking fails?

Expand Messages
  • Marcel Duran
    I raised this issue a while ago and got no response: http://tech.groups.yahoo.com/group/jslint_com/message/1544 Marcel ... -- Marcel Duran [Non-text portions
    Message 1 of 2 , Feb 22, 2011
    • 0 Attachment
      I raised this issue a while ago and got no response:
      http://tech.groups.yahoo.com/group/jslint_com/message/1544

      Marcel

      On Tue, Feb 22, 2011 at 5:16 AM, John Hawkinson <jhawk@...> wrote:

      >
      >
      > I just watched JSLint (Edition 2011-02-20) fail to catch an example of
      > an unfiltered for statement in my code, and broke it down to this test
      > case:
      >
      > function f(article) {
      > var i, o = {};
      > for (i in o) {
      > if (o[i] > 7) {
      > return o;
      > }
      > }
      > }
      >
      > Shouldn't JSLint flag this as an "unfiltered for" -- o might inherit
      > a property that was not what was intended -- a numeric value directly
      > assigned to some property in o -- and screw up the behavior?
      >
      > Thanks.
      >
      > --jhawk@...
      > John Hawkinson
      >
      >



      --
      Marcel Duran


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