title: a = {prop: a} vs a.prop = a: why is the first not a circular data structure?
body: <p>What is the difference between the following? To me they look equivalent, but one results in a circular data structure and the other doesn't.</p>
  
  <pre><code>var a = {};
  a = {prop: a};
  JSON.stringify(a); // {"prop":{}}
  
  var b = {};
  b.prop = b;
  JSON.stringify(b); // TypeError: Circular
  </code></pre>
  
  <p>Why does <code>prop: a</code> on line 2 not point to the object <code>a</code> and result in a circular data structure?</p>