title: Create Array and fill with index plus one in JavaScript
body: <p>I am trying to create an Array using <code>new Array()</code> and filling with index + 1 but somehow, though array is creating successfully but values are not filling correctly.</p>
  <p><strong>Code -</strong></p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var aa = (new Array(4)).map((x, index) =&gt; {
      return index + 1;
  });
  
  console.log(aa);</code></pre>
  </div>
  </div>
  </p>
  <p>Output - <code>[undefined, undefined, undefined, undefined]</code></p>
  <p>Expected - <code>[1, 2, 3, 4]</code></p>
  <p>Let me know what I am doing wrong here.</p>