Javascript unbind variables : <p>I have the following code that copy variable value then change its value.</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>var a = [{name: 'John Doe'}];
var b = a;

document.write(b[0].name + '&lt;br /&gt;');
document.write(a[0].name + '&lt;br /&gt;&lt;br /&gt;');

b[0].name = 'Jane Doe';

document.write(b[0].name + '&lt;br /&gt;');
document.write(a[0].name + '&lt;br /&gt;');</code></pre>
</div>
</div>
</p>

<p>But somehow that also change first variable value</p>

<p>How do I make variable A to keep its value?</p>
