How to remove an element from an array in Swift

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", "moose"]

How could the element animals[2] be removed from the array?

18 Answers
18

Leave a Comment