title: Why a is undefined while b is 3 in var a=b=3?
body: <p>In the following code, I expected both <code>a</code> and <code>b</code> to be <code>3</code>. However, <code>a</code> is <code>undefined</code> and <code>b</code> is <code>3</code>. Why?</p>
  
  <pre><code>(function(){
      var a = b = 3;
  })();
  
  console.log(typeof a);//"undefined"
  console.log(b);//3
  </code></pre>