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
To remove elements from an array, use the remove(at:), removeLast() and removeAll().
remove(at:)
removeLast()
removeAll()
yourArray = [1,2,3,4]
Remove the value at 2 position
yourArray.remove(at: 2)
Remove the last value from array
yourArray.removeLast()
Removes all members from the set
yourArray.removeAll()