title: Array overwrite not working as expected
body: <p>I wrote a simple function to overwrite an array as follows:</p>
  
  <pre><code>function overwrite(arr) {
      let temp = [3, 2, 1];
      arr = temp;
  }
  
  let myarray = [1, 2, 3];
  overwrite(myarray);
  console.log(myarray);
  [ 1, 2, 3 ]
  </code></pre>
  
  <p>The console output still shows the original array.  How come?</p>
  
  <p>By the way, I did figure out how to do it.  I feel like the above approach should've worked but didn't, and so I am curious to know why.  </p>