title: For loop is not iterating within setTimeout
body: <p>I'm trying to figure out why this for loop does not render out 0,1,2,3 like its suppose to.</p>
  
  <p>It renders <code>4, 4 , 4, 4</code>.</p>
  
  <p>How would i get this to print <code>0, 1, 2, 3</code> with the setTimeout still in place ?</p>
  
  <pre><code>for (var i = 0; i &lt; 4; i++) {   
      setTimeout(function() {     
          console.log('The index of this number is: ' + i);   
      }, 3000); 
  }
  </code></pre>