title: Why are Object.keys() and for ... in different?
body: <p>I'm trying to do a bit of browser object discovery, figuring out browser built-ins etc...</p>
  
  <p>I noticed different results when trying to get at the window object's properties (just FYI I'm using Chrome Version 41.0.2272.89 (64-bit)).</p>
  
  <pre><code>Object.keys(window).length;
  </code></pre>
  
  <p>returns 7 keys. From the docs Object.keys() returns the enumerable properties of an object.</p>
  
  <p>But the docs also say that <code>for ... in</code> iterates over the enumerable properties of an object. However:</p>
  
  <pre><code>    var i = 0;
      for (var propertyName in window) {
          i++;
      }
  </code></pre>
  
  <p>returns a count of 177.</p>
  
  <p>Why is this different? Shouldn't they both only be returning the count of enumerable properties?</p>