title: Value returned by the assignment
body: <p>Why does the regular assignment statement (say,  <code>x = 5</code>) return the value assigned (<code>5</code> in this case), while the assignment combined with a variable declaration (<code>var x = 5</code>) returns <code>undefined</code>?</p>
  
  <p>I got the return values by executing these statements in the Chrome browser's Javascript console:</p>
  
  <pre><code>&gt; var x = 5;
  undefined
  &gt; y = 5;
  5
  </code></pre>