Strange behavior array in object JavaScript
<p>Why b.first[0] return "t" and how I can avoid this?</p>

<p>I need safe "q" in b.first[0]</p>

<pre><code>var extend = function(o,p){
    for(prop in p){
        o[prop] = p[prop];
    }
    return o;
};

var a = {first:['q','w']};
var b = {};

extend(b,a);

document.write(a.first[0]); //q
document.write(b.first[0]); //q

a.first[0] = 't';

document.write(a.first[0]); // t
document.write(b.first[0]); // t ?????????????????????
</code></pre>
