title: JavaScript native inheritance chain
body: <pre><code>          null
             ^
             |
           Object
             ^
             |
    String - Array - Boolean - Object - Number
       ^                         ^
       |                         |
  "hello world"              { foo: 1 }
  </code></pre>
  
  <p>I would like to know if my inheritance scheme above is correct. I made it based it on tests like </p>
  
  <pre><code>console.log(typeof [].hasOwnProperty) // function
  </code></pre>
  
  <p>What I'm aslo curious about is if the <code>Object</code> part is correct. For example, <code>.hasOwnProperty()</code> is defined on the <code>Object.prototype</code>. So when you create an object literal like <code>{ foo: 1 }</code> above, I guess that the <code>{ foo: 1 }.hasOwnProperty</code> method is inherited from a base object?</p>