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

2039Re: For in filter

Expand Messages
  • Ezequiel
    Mar 9, 2011
    • 0 Attachment
      --- In jslint_com@yahoogroups.com, "Douglas Crockford" <douglas@...> wrote:
      >
      > --- In jslint_com@yahoogroups.com, "Ezequiel" <thehungerforce@> wrote:
      > >
      > > Because I'm using my own function for the if statement, this doesn't work:
      > >
      > > example:
      > >
      > > var isOwnProperty, object, i;
      > >
      > > isOwnProperty = function(object, key) {....};
      > >
      > > object = {zero: 0};
      > >
      > > for (i in object) {
      > > if (isOwnProperty(object, i)) {
      > > ...
      > > }
      > > }
      > >
      > > However, it works if my if statement was something like... object.hasOwnProperty(i);
      >
      >
      > You turned on the forin option. You can not do that.
      >

      No, I did not have any options turned on when I ran that snippet.
    • Show all 6 messages in this topic