javascript i++ vs ++i

In javascript I have seen i++ used in many cases, and I understand that it adds one to the preceding value:

for (var i=1; i<=10; i++) {

But what happens when I do this:


And is it any different using the -- operator (besides of course that it’s subtraction rather than addition)?

33 thoughts on “javascript i++ vs ++i”

  1. 887126 328504Hi, Neat post. Theres a problem along with your website in internet explorer, could test this IE nonetheless is the marketplace leader and a excellent portion of individuals will omit your superb writing because of this dilemma. 733797