title: Efficient way to create and fill an array with consecutive numbers in range
body: <p>for the moment i use this JavaScript
  to create an array with n numbers from 0 to n</p>
  
  <pre><code>// javascript populate array 
  var n=1000;
  var arr=[n];
  for (i=n;i&gt;=0;i--) {
  arr[i]=i;
  console.log(arr[i]);
  } 
  
  </code></pre>
  
  <p>is it the fast/right way to do the task?</p>