How can I unset/remove an element from an array in Apple\'s new language Swift?
Here\'s some code:
let animals = [\"cats\", \"dogs\", \"chimps\", \"m
If you don't know the index of the element that you want to remove, and the element is conform the Equatable protocol, you can do:
animals.remove(at: animals.firstIndex(of: "dogs")!)
See Equatable protocol answer:How do I do indexOfObject or a proper containsObject