title: javascript reverse an array without using reverse()
body: <p>I want to reverse an array without using reverse() function like this: </p>
  
  <pre><code>function reverse(array){
      var output = [];
      for (var i = 0; i&lt;= array.length; i++){
          output.push(array.pop());
      }
  
      return output;
  }
  
  console.log(reverse([1,2,3,4,5,6,7]));
  </code></pre>
  
  <p>However, the it shows [7, 6, 5, 4]   Can someone tell me, why my reverse function is wrong? Thanks in advance!</p>