Returns the first index where the specified value appears in the collection.
- Xcode 7.1+
- Swift Standard Library
The first index where
element is found. If
element is not found in the collection, returns
index(of:) to find the position of a particular element in a collection, you can use it to access the element by subscripting. This example shows how you can modify one of the names in an array of students.