title: ++i vs i++ in javascript confusing function
body: <p>What would be the difference between</p>
  
  <pre><code>var nums = [];
  for (var i = 0; i &lt; 10; ++i) {
  nums[i] = i+1;
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>var nums = [];
  for (var i = 0; i &lt; 10; i++) {
  nums[i] = i+1;
  }
  </code></pre>
  
  <p>In the <code>for</code> loop, <code>i = 0</code>, but in the first iteration, would nums[i] = nums [0] or nums [1] since we are using <code>++i</code>? How would the first iteration be different if <code>i++</code> were used instead?</p>
  
  <p>Update: For this particular <code>for</code> loop it doesn't matter. However, I'm interested to see a <code>for</code> loop where <code>++i</code> vs <code>i++</code> matters.</p>