Swift remove element from array by value var array = [1, 2, 3]array.remove(at: 0) // array is now [2, 3] var array = ["hello", "world"]if let index = array.firstIndex(of: "hello") { array.remove(at: index) // array is now ["world"]} var array = ["hello", "world", "hello"]if let index = array.firstIndex(of: "hello") { array.remove(at: index) // array is now ["world", "hello"]} var array = ..