Swift For-Each Loop
Use forEach to iterate sequences with a closure.
Iterate with forEach closures
Pass a closure to forEach to process each element of a sequence.
Example
clike
["A","B","C"].forEach { print($0) }
Enumerated forEach
Use enumerated() with forEach to get index and value.
Example
clike
let items = ["A","B","C"]
items.enumerated().forEach { print("\($0.offset): \($0.element)") }