Skip to content

Instantly share code, notes, and snippets.

@vialyx
Created February 28, 2018 09:53
Show Gist options
  • Save vialyx/05a3b9f863cde4cdac2b65182b91b348 to your computer and use it in GitHub Desktop.
Save vialyx/05a3b9f863cde4cdac2b65182b91b348 to your computer and use it in GitHub Desktop.
for (index, user) in allUsers.enumerated() {
print("User: \(user) at index: \(index)")
/*
User: User(id: 654, name: "Chilly Mango") at index: 0
User: User(id: 7, name: "Mike Biggles") at index: 1
User: User(id: 234, name: "Midum Premium") at index: 2
User: User(id: 99, name: "Jimmy Cho") at index: 3
*/
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment