title: Creating x objects using array and map
body: <p>I want to create 10 <code>Fly</code> objects in a functional manner. I thought this would work:</p>
  
  <pre><code>var flies = new Array(10).map(function() {
      return new Fly();
  });
  </code></pre>
  
  <p>It doesn't. It creates an array of length ten with <code>undefined</code> as their values.</p>
  
  <p>How can I create 10 objects without using <code>for(var i = 0; i &lt; 10; i++)...</code>?</p>
  
  <p>EDIT: This is an <strong>academic exercise</strong> for the sake of learning only. It's find if a <code>for</code> is used under the hood. I'm just trying to figure out what JavaScript can do.</p>