1// ++i returns the value of i after it has been incremented. i++ returns the value of i before incrementing.
2
3// When the ++ comes before its operand it is called the "pre-increment" operator, and when it comes after it is called the "post-increment" operator.
4
5// This distinction is only important if you do something with the result.
6
7var i = 0, j = 0;
8
9alert(++i); // alerts 1
10alert(j++); // alerts 0