title: How does the array property work in JS object
body: <p>For the following code, why the <code>propB</code> of <code>myObj</code> is updated? And why <code>test.childObj</code> doesn't have the own property <code>propB</code>?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var myObj = { propA: '', propB: [] }
  var fatherObj = {
      childObj: null,
      init: function() {
          this.childObj = Object.create(myObj);
          this.childObj.propA = 'A';
          this.childObj.propB.push(2);
      }
  }
  
  var test = Object.create(fatherObj);
  test.init();
  
  console.log(myObj.propB.length);
  console.log(test.childObj.hasOwnProperty('propA'));
  console.log(test.childObj.hasOwnProperty('propB'));</code></pre>
  </div>
  </div>
  </p>