title: Javascript - insert an array inside another array
body: <p>What is the more efficient way to insert an array inside another array. </p>
  
  <pre><code>a1 = [1,2,3,4,5];
  a2 = [21,22];
  
  newArray - a1.insertAt(2,a2) -&gt; [1,2, 21,22, 3,4,5];
  </code></pre>
  
  <p>Iterating a2 using splice looks a bit awfull from a performance point of view if a2 array is large.</p>
  
  <p>Thanks.</p>