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

Code Example 1

let numbers = [1, 2, 3, 4, 5]

for number in numbers {
    print(number)
}

Learn ReactJs, React Native from akashmittal.com