title: reverse array in place
body: <p>Why won't this function <code>reverseArrayInPlace</code> work? I want to do simply what the function says - reverse the order of elements so that the results end up in the same array <code>arr</code>. I am choosing to do this by using two arrays in the function. So far it just returns the elements back in order...</p>
  
  <pre><code>    var arr = ["a","b","c","d","e","f"]
      var arr2 = []
  
      var reverseArrayInPlace = function(array){
  
        var arrLength = array.length
        for (i = 0; i &lt; arrLength; i++) {
          arr2.push(array.pop())
          array.push(arr2.shift())
        }
      }
  
      reverseArrayInPlace(arr)
  </code></pre>