Basic Array Operations
Count
Get
let myList = ["a", "b", "c"]
// myList: [String] = ["a", "b", "c"]
myList[0]
"a": String
myList[myList.count - 1]
"c": String
myList[-1]
// Fatal error: Index out of range
myList[myList.count]
// Fatal error: Index out of rangePut
Removal
Addition
Last updated
Was this helpful?
