title: array.push.apply to implment 'concat' with explain
body: <p>Learning reactive programming and encouter this bit of code,</p>
  
  <pre><code>results.push.apply(results, subArray);
  </code></pre>
  
  <p>understand apply</p>
  
  <p><strong>FULL CODE</strong></p>
  
  <pre><code>Array.prototype.concatAll = function() {
      var results = [];
      this.forEach(function(subArray) {
          results.push.apply(results, subArray);
      });
  
      return results;
  };
  </code></pre>
  
  <p><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply" rel="nofollow">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply</a></p>
  
  <p>but when this code appear and get my head spinning. it's pretty much doing the <code>concat</code>. can someone please explain? </p>
  
  <p>many thanks</p>