The following code results in the exact same output.
Is there an advantage to using i++ over ++i (or visa-versa) in the loop?
Similar question for the increment method in the following:
Is there an advantage to using i++ over ++i (or visa-versa) in the loop?

Code:
<script type="text/javascript"> var tarr1 = []; for (var i=0; i<10; i++) { tarr1.push(i); } var tarr2 = []; for (var i=0; i<10; ++i) { tarr2.push(i); } alert(tarr1.join(',')+'\n'+tarr2.join(',')); </script>
Code:
<script type="text/javascript"> var tarr1 = []; var i=0; do { tarr1.push(i); i++; } while (i<10); var tarr2 = []; var j=0; do { tarr2.push(j); ++j; } while (j<10); alert(tarr1.join(',')+'\n'+tarr2.join(',')); </script>
Comment