Variable affecting its parent variable <p>The title might seems weird, but I don't really know how to describe this situation as I'm a beginner in JavaScript.</p> <p>Here's the code :</p> <pre><code>a={}; var b=a; b['a']='x'; console.log(a); </code></pre> <p>the result will be:</p> <pre><code>Object { a="x"} </code></pre> <p>shouldn't it be a blank object because I set 'x' to variable b only ?</p>