title: Array.fill(Array) creates copies by references not by value
body: <p>I'm trying to create a 6 by 12 Matrix using <code>Array.fill</code></p>
  
  <pre><code>let m = Array(6).fill(Array(12).fill(0));
  </code></pre>
  
  <p>While this works, the problem is that the inner Arrays are actually all referencing the same <code>Array</code> object.</p>
  
  <pre><code>let m = Array(6).fill(Array(12).fill(0));
  m[0][0] = 1;
  console.log(m[1][0]); // Outputs 1 instead of 0
  </code></pre>
  
  <p>I wanted (and expected) the value of <code>m[1][0]</code> to be <code>0</code>.</p>
  
  <p>How can I force <code>Array.fill</code> fill copy-by-values of the given argument (eg: <code>Array(12).fill(0)</code> is the argument in my case) instead of copying by reference ?</p>