ios swift for how to get index in for code example
Example: swift for loop index
for (index, object) in list.enumerated() {
print("Item at \(index): \(object)")
}
for (index, object) in list.enumerated() {
print("Item at \(index): \(object)")
}