title: JavaScript Possible Iteration Over Unexpected
body: <p>I have the following code:</p>
  
  <pre><code>  for (i in awards) {
           if (awards[i] instanceof Array === false) {
                 console.log(awards[i]);
                  httpFactory.patch(awards[i], {"read": true}, false);
               }
         }
  </code></pre>
  
  <p>My IDE shows this error relating to the code above:</p>
  
  <blockquote>
    <p>Possible iteration over unexpected (custom / inherited) members,
    probably missing hasOwnProperty check</p>
    
    <p>Checks for any instances of unfiltered for-in loops in JavaScript. The
    use of this construct results in processing inherited or unexpected
    properties. You need to filter own properties with hasOwnProperty()
    method. The validation works in JavaScript, html or jsp files.</p>
  </blockquote>
  
  <p>Could you explain in more detail what is meant by this statement?</p>