Whats the point of doing this i += 5 instead of i + 5


#1



Replace this line with your code.


#2

i+=5 is the shortcut for i= i+5 which computes the value i+5 and stores the result back in i.
On the other hand i+5 just computes a value and does nothing with it, so if a loop relies on i changing after every loop then this won't do the trick.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.