Possible Duplicate:
Incrementing in C++ - When to use x++ or ++x?
I've seen things like i++
commonly used in, say, for
loops. But when people use --
instead of ++
, for some reason some tend to write --i
as opposed to i--
.
Last time I checked, they both work (at least in JavaScript). Can someone tell me if this is so in other C-family languages, and if it is, why do some people prefer --i
to i--
?