title: Javascript Prototypal Inheritance & object properties shadowing
body: <pre><code>var person = { name :"dummy", personal_details: { age : 22, country : "USA" } };
  
  var bob = Object.create(person);
  
  bob.name = "bob";
  bob.personal_details.age = 23;
  
  
  console.log(bob.personal_details === person.personal_details);
  // true : since it does not shadow object of prototype object
  
  console.log(bob.name  === person.name);
  // false : since it shadows name
  
  ////now
  bob.personal_details  = {a:1};
  console.log(bob.personal_details === person.personal_details); 
  </code></pre>
  
  <p>//false</p>
  
  <p>When object <strong><em>bob</em></strong> tries to override "<strong><em>name</em></strong>" property of <strong><em>person</em></strong> then, it gets shadowed in bob itself.</p>
  
  <p>But in case of <strong>personal_details</strong> the same rule is violated.</p>
  
  <p>I am quite curious to know why is it like so ??</p>
  
  <p><strong>Here is the link to jsbin : <a href="http://jsbin.com/asuzev/1/edit" rel="noreferrer">http://jsbin.com/asuzev/1/edit</a></strong></p>