title: Javascript - Modify an array duplicate without modifying the original array
body: <p>I'm sure this is a stupid thing, but i can't solve it.</p>
  
  <p>If i do this:</p>
  
  <pre><code>var arr = [1, 2, 3, "up"];
  var duplicate = arr;
  duplicate[3] = "down";
  console.log(arr[3]); //"down"
  console.log(duplicate[3]); //"down"
  </code></pre>
  
  <p>So why the original array got modified too? It is related to the fact that they point to the same array?</p>
  
  <p>How to modify only the duplicate?</p>