title: In JavaScript, is chained assignment okay?
body: <p>Am not new to JS or its syntax, but sometimes, the semantics of the language has me stumped at times. At work today, a colleague mentioned this:</p>
  
  <pre><code>var a = b = [];
  </code></pre>
  
  <p>is not the same as</p>
  
  <pre><code>var a = [], b = [];
  </code></pre>
  
  <p>or</p>
  
  <pre><code>var a = []; var b = [];
  </code></pre>
  
  <p>since the first version actually assigns the reference to an empty array to a and b. I couldn't quite accept this as true, but I'm not sure. What do you all think?</p>