title: How to turn around the content of an array to another array with a forEach-Loop?
body: <p>I would like to know whats wrong with my code.
  As in the title descripted I would like to turn around the content of an array with a for loop to another array. I would like to use ES5 for this since I am not used to ES6+ yet.</p>
  <p>Here is my code:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>    var arrayA = ["h","e","l","l","o"];
      var arrayB = [];
       function copyArray(oldArray, newArray) {
         oldArray.forEach(function() {
              var storeElement = oldArray.pop();
             newArray.push(storeElement); 
       });
         console.log(oldArray + " old array");
         console.log(newArray + " new array");
      }
      
      
      copyArray(arrayA, arrayB);</code></pre>
  </div>
  </div>
  </p>
  <p>The result is:</p>
  <pre><code>&quot;h,e,l,l old array&quot;
  &quot;o new array&quot;
  &quot;h,e,l old array&quot;
  &quot;o,l new array&quot;
  &quot;h,e old array&quot;
  &quot;o,l,l new array&quot;
  &quot;h,e FINAL old array&quot;
  &quot;o,l,l FINAL new array&quot;
  </code></pre>
  <p>But it should be:</p>
  <pre><code>&quot;&quot; FINAL old array
  &quot;o, l, l, e, h&quot; FINAL new array. 
  </code></pre>
  <p>What is going wrong?</p>