javascript variable assignment core
<p>suppose i have this</p>

<pre><code>var x={};    //x is an address in the memory where object is stored
var z=x;     //z=x after execution is equal to z={} right?
</code></pre>

<p>now z has nothing to do with x or not related to x after execution so when,</p>

<pre><code>x={name:"Maizere"};
z!=x        //true
</code></pre>

<p>but, when</p>

<pre><code>x.name="maizere";
alert(z.name)//maizere why?
</code></pre>

<p>we are not setting the value of z but x and  z relation to x shouldn't exit anymore</p>

<p>actual code:</p>

<pre><code> x={};
 y=x;
 x.name="maizere";
 alert(y.name)//maizere
</code></pre>

<p>I really have no knowledge of how this is working .Can anyone explain this in detail please?</p>
