title: Dynamically created Array always filled with variables
body: <p>Why is the logged Array always filled with data? Shouldnt it be an array with only one then two then three arrays in it? </p>
  
  <pre><code>var theArray=[];
  function insertValues(species,quantity){
      var w = window;
      w[species]= [];
          for(let i =0; i&lt;quantity;i++){
              w[species].push({
                  species:species,
                  randomValue:Math.random()*10
                  })
                  // console.log(theArray);
          }
  
      theArray.push(w[species]);
  }
  
  var listOfSpecies =[{animal:"Fish",amount:5},{animal:"Shark",amount:5},{animal:"Algae",amount:5}];
  
  for(let i = 0; i&lt;listOfSpecies.length; i++){
      console.log(theArray);
  
      insertValues(listOfSpecies[i].animal,listOfSpecies[i].amount);
  }
  </code></pre>