title: Javascript: add value to array while looping that will then also be included in the loop
body: <p>Sorry if this is a dupplicate, can't seem to find it.</p>
  
  <pre><code>var a = [1,2,3,4];
  a.forEach(function(value){
    if(value == 1) a.push(5);
    console.log(value);
  });
  </code></pre>
  
  <p>I wonder if there is a way (any sort of loop or datatype) so that this will ouput 1 2 3 4 5 during the loop (or in any order, as long as all the 5 numbers are in there)</p>