get index in for in loop swift 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)")
}