Created
March 1, 2018 12:20
-
-
Save ahmedghazi/682ebbaa7b7c5a0520d624fde9b5a1c3 to your computer and use it in GitHub Desktop.
array loop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1st draw: [0,1,2,3] | |
2nd draw: [1,2,3,0] | |
3rd draw: [2,3,0,1] | |
4th draw: [3,0,1,2] | |
arr[i] = (arr[i]+1)%arr.length; | |
arr[i] = arr[ (i + 1) % arr.length ]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment