title: JS Alert showing 'undefined'
body: <p><strong>Hi there,</strong></p>
  
  <p>I just moved from C#/C++ to JavaScript last night, and am loving it!</p>
  
  <p>I've just come across some behavior that I don't understand, wondering if anyone can shed some light on it?</p>
  
  <p>When I call this script, I'm getting the expected alert box showing '5.5', however after that box is closed I get another alert simply showing "undefined", can anyone shed any light on this?</p>
  
  <p><strong>Code below:</strong></p>
  
  <pre><code>var myObj = {
  
  age : 5,
  weight : 5.5,
  
  toString : function(){
      alert(this.weight);
  }
  
  }
  
  alert(myObj.toString());
  </code></pre>
  
  <p>Many thanks</p>