title: functional loop given a number instead of an array
body: <p>Say I have a number 18, instead of an array, in hand.</p>
  
  <p>What is the best way to create a <em>functional</em> loop in JS given a number X instead of array of X elements?</p>
  
  <p>I can do this:</p>
  
  <pre><code>[1,2,3].forEach(function(){
  
  ));
  </code></pre>
  
  <p>but if I have the number 3</p>
  
  <p>I can do</p>
  
  <pre><code>for(var i = 0; i &lt; 3; i++){
  
  }
  </code></pre>
  
  <p>but I want that loop to be functional instead</p>