So I have an Array with a length of 4. When I increment it by 1 and the number gets bigger than the length of the array, I\'d like it to rollover.
For example:
You can use the modulo operator.
current_index = (current_index + n) % 4;