Strange behavior with Arrays and slice
<p>I was playing around with some arrays in JavaScript when I came across something strange.  Here is my code:</p>

<pre><code>var origArray = new Array("one","two","three","four","five","six","seven","eight");

var newArray = origArray.slice(1,3);
origArray[1] = "octopus";
console.log(newArray.join()); //prints two,three 

var origArray = new Array(["one","two"],["three","four"],["five","six"],["seven","eight"]);

var newArray = origArray.slice(1,3);
origArray[1][0] = "octopus";
console.log(newArray.join()); //prints octopus,four,five,six
</code></pre>

<p>I don't understand why <code>newArray</code> gets affected in the second case and not the first.  What's going on here?</p>
