Answers for "how to enumerate arrays"

0

how to enumerate arrays

let array = ["Apples", "Peaches", "Plums"]

for (index, item) in array.enumerated() {
    print("Found \(item) at position \(index)")
}
Posted by: Guest on May-01-2020

Browse Popular Code Answers by Language