Check out example codes for "swift for loop index". It will help you in understanding the concepts better.

Code Example 1

for (index, object) in list.enumerated() {
  print("Item at \(index): \(object)")
}

Learn ReactJs, React Native from akashmittal.com