title: Referencing properties that are anonymous vs named functions
body: <p>Reading John Resig's <a href="http://ejohn.org/apps/learn/#13" rel="nofollow noreferrer">Learning Advanced Javascript</a>, I came across two slides that I don't completely understand.</p>
  
  <p>Slide #13 - Reference a property that is an anonymous function. The second assert Fails.</p>
  
  <pre><code>var ninja = { 
    yell: function(n){ 
      return n &gt; 0 ? ninja.yell(n-1) + "a" : "hiy"; 
    } 
  }; 
  assert( ninja.yell(4) == "hiyaaaa", "A single object isn't too bad, either." ); // PASS
  
  var samurai = { yell: ninja.yell }; 
  var ninja = null; 
  
  try { 
    samurai.yell(4); 
  } catch(e){ 
    assert( false, "Uh, this isn't good! Where'd ninja.yell go?" ); // FAIL
  }
  </code></pre>
  
  <p>Slide #14 - Reference a property that is a defined function. The second assert passes.</p>
  
  <pre><code>var ninja = { 
    yell: function yell(n){ 
      return n &gt; 0 ? yell(n-1) + "a" : "hiy"; 
    } 
  }; 
  assert( ninja.yell(4) == "hiyaaaa", "Works as we would expect it to!" ); // PASS
  
  var samurai = { yell: ninja.yell }; 
  var ninja = {}; 
  assert( samurai.yell(4) == "hiyaaaa", "The method correctly calls itself." ); // PASS
  </code></pre>
  
  <p>The only difference here is that <code>yell</code> is a named function in slide 14. Why does the reference to a property defined as a named function remain even after setting the original object (<code>ninja</code>) to a new object (or even null)? </p>