Possible Duplicate:
++someVariable Vs. someVariable++ in Javascript
I know you can add one to a variable simply by doing i++
(assuming i is your variable). This can best be seen when iterating through an array or using it in a "for" statement. After finding some code to use online, I noticed that the for statement used ++i
(as apposed to i++
).
I was wondering if there was any significant difference or if the two are even handled any differently.