Because of JSLint, I almost always use i += 1
to increment a JavaScript for loop, but for quick and dirty scripts, I use i++
instead.
However, I se
In JS and PHP it does not make any difference, I think even in Java it does not make any difference but in pure c when compiler is not optimizing code it does, and that is why a lot of people use ++i because they are used to it from c.
EDIT: This is an answer for JS if you want history of pre and post increment searc C/C++ pre/post increment. Or see comments on @Orvev's answer.