Last active
February 28, 2018 16:50
-
-
Save vialyx/5beb07b0d8de8b541253dcacbf055050 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
users.append(User(name: "Maxim Vialyx")) | |
// [{name "Maxim Vialyx"}] | |
users.remove(at: 0) | |
// [] | |
users.append(User(name: "Medium Guest")) | |
// [{name "Medium Guest"}] | |
users.removeFirst() | |
// [] | |
users = [User(name: "Last Candidate")] | |
// [{name "Last Candidate"}] | |
users.removeLast() | |
// [] | |
users.removeAll() | |
// [] | |
let admins = [User(name: "Admin")] | |
// [{name "Admin"}] | |
let guests = [User(name: "Guest")] | |
// [{name "Guest"}] | |
let allUsers = admins + guests | |
// [{name "Admin"}, {name "Guest"}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment