Programming: Incrementing a Variable in the Appropriate Code Location

It's easy to put a changing variable in the incorrect location in code. In this example, an incrementing variable was put before the code where it is used and the code needed to use the variable as the 0 value as well, so the incrementing variable should have been put after this code.



Back to blog

Leave a comment

Please note, comments need to be approved before they are published.