Last active
March 13, 2018 07:19
-
-
Save vialyx/ddf324fd3281aec026b85e221a83d87d to your computer and use it in GitHub Desktop.
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
let admins = [User(name: "Admin")] | |
// [{name "Admin"}] | |
let guests = [User(name: "Guest")] | |
// [{name "Guest"}] | |
var allUsers = admins + guests | |
// [{name "Admin"}, {name "Guest"}] | |
// TODO: - Iterate over the entire collection with the for-in loop: | |
for user in allUsers { | |
print("User: \(user)") | |
/* | |
User: User(name: "Admin") | |
User: User(name: "Guest") | |
*/ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment