Loop Over Array of Elements with Index

// Create an Array with three elements
var myArray = ["Swift", "Objective-C", "PHP"]

// Iterate over Array elements. Display element and it's index
for (index, element) in myArray.enumerate() {
    print("Element \(element) is at index \(index)")

[raw_html_snippet id=”cookbookpagecoursesheader”]

Unit Testing Swift Mobile App

Apply Test-Driven Development(TDD) process to iOS mobile app development in Swift Preview this video course.