title: javascript create array from for loop
body: <p>I have a years range stored into two variables. I want to create an array of the years in the range.</p>
  
  <p>something like:</p>
  
  <pre><code>var yearStart = 2000;
  var yearEnd = 2040;
  
  var arr = [];
  
  for (var i = yearStart; i &lt; yearEnd; i++) {
  
       var obj = {
          ... 
       };
  
        arr.push(obj);
  }
  </code></pre>
  
  <p>What should I put inside the obj ?</p>
  
  <p>The array I'd like to generate would be like:</p>
  
  <pre><code>arr = [2000, 2001, 2003, ... 2039, 2040]
  </code></pre>