Skip to content

Instantly share code, notes, and snippets.

@vialyx
Created February 28, 2018 11:50
Show Gist options
  • Save vialyx/b73c3ea5c948dac38b498be077cca634 to your computer and use it in GitHub Desktop.
Save vialyx/b73c3ea5c948dac38b498be077cca634 to your computer and use it in GitHub Desktop.
let user = User(name: "Medium Guest")
users[120] = user
print("users count: \(users.count)")
// users count: 1
users.removeValue(forKey: 100)
print("users count: \(users.count)")
// users count: 1
users.removeAll()
print("users count: \(users.count)")
// users count: 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment