explain var {A: a} = {A: 1}
<p>I have the following pieces of code (which only parses and runs correctly in Firefox)</p>

<pre><code>var {A: a} = {A: 1};
console.log(a); // 1
</code></pre>

<p>And now we have a variable called 'a' with value is 1</p>

<p>So I have 3 questions to ask</p>

<ol>
<li>Why do we need 'var' here? Why don't we need var on the rhs of '='</li>
<li>How does 'a' be in the scope ?</li>
<li>How does 'a' get assigned to 1? <br>
it seems uses member-wise copy here, but why? <br> 
shouldn't the object on the lhs will reference to the object on rhs? <br></li>
</ol>

<p>For example,</p>

<pre><code>var b = {B: 1};
var c = {B: 2};
b = c;
b.B = 3;
console.log(c);
</code></pre>

<p>In this assignment(b = c), b now references to c, and they share the same object. Why this assignment differs from my original one?</p>

<p>Forgot to mention I am testing on Firefox 16.0</p>
