title: Javascript's "Object.getOwnPropertyNames" Missing Properties?
body: <p>I love the Object.getOwnPropertyNames method. It seems like such a useful tool for learning about objects from within a JS shell.</p>
  
  <p>What's driving me nuts, though, is that getOwnPropertyNames seems to be missing some (Note: in my tests I am running an ECMA 5 implementation—Google Chrome version 28.0.1500.95). </p>
  
  <p>Here's an example:</p>
  
  <pre><code>&gt; var x= []
  undefined
  &gt; x.constructor
  function Array() { [native code] }
  &gt; Object.getOwnPropertyNames(x)
  ["length"]
  </code></pre>
  
  <p>Yet clearly, x has lots of properties! (e.g. <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/prototype">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/prototype</a>)</p>
  
  <pre><code>&gt; x.push
  function push() { [native code] }
  &gt; x.pop
  function pop() { [native code] }
  </code></pre>
  
  <p>Can anyone help explain what's going on here? Thanks! :D</p>
  
  <p>Edit: Okay! I see that getOwnPropertyNames only gets the property names of the object at hand. Is there a simple way to get inherited properties? Or perhaps the only way is to traverse through object.constructor.prototype.__proto__?</p>