Created
May 22, 2019 13:09
-
-
Save shakyra/420f14355a212bacb6de05b5219c59d9 to your computer and use it in GitHub Desktop.
Using a loop to reverse an array
This file contains 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
var toDoList = ["Take out garbage", "Pay bills", "Cross off finished items"] | |
for _ in toDoList { | |
toDoList.reverse() | |
print(toDoList) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment