title: javascript - how to clone Array without reference
body: <p>I'm trying to clone Array to a new one, and I want cloned array has no reference to original copy</p>
  
  <p>I know there're <code>splice</code> and <code>from</code> method, but new array from those methods all has reference to original array</p>
  
  <p>e.g.</p>
  
  <pre><code>let original = [ [1,2], [3,4] ];
  let cloned = Array.from(original); // this will copy everything from original 
  original[0][0] = -1;
  console.log(cloned[0][0]); // the cloned array element value changes too
  </code></pre>
  
  <p>I also tried using loop to have <code>cloned[i][j] = original[i][j]</code>, but result is the same</p>
  
  <p>How can I create a new Array with every element having same value from original Array, but the cloned Array should have no reference to original Array?</p>
  
  <p>thanks!</p>