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

Re: option.forin

Expand Messages
  • Douglas Crockford
    ... Yes, because some third party code could insert something into Object.prototype without your knowledge and approval. So program defensively, so that your
    Message 1 of 8 , Feb 24, 2011
    • 0 Attachment
      --- In jslint_com@yahoogroups.com, "bluflonalgul" <bluflonalgul@...> wrote:

      > I think there is this case where the 'for in' loops on a object used as a record.
      > Does it makes sense here to had such tests mentioned in your option.forin ?


      Yes, because some third party code could insert something into Object.prototype without your knowledge and approval. So program defensively, so that your code will always perform correctly.
    Your message has been successfully submitted and would be delivered to recipients shortly.