+ 1
What's up with a++ ++b
What do the ++ stand for and what do they do to the number?
2 Answers
+ 2
a++ its a post increment, so it will use the acutal value of a, and then increment the value by 1.
++a increments before the operation. so
var a = 1;
print(a++); //this will show 1.now a value its 2.
var b =1;
print (++b); //this will show 2, and the value of b its 2.
+ 1
a++ is a post increment operator while ++b is a pre increment operator.....