Skip to content

Instantly share code, notes, and snippets.

@mlvea
Last active August 29, 2015 14:17
Show Gist options
  • Save mlvea/69569fb660013f978620 to your computer and use it in GitHub Desktop.
Save mlvea/69569fb660013f978620 to your computer and use it in GitHub Desktop.
Objective c array enumeration in swift
//Teams play for Cricket world cup 2015 super 8
var superEight = ["NZ","Aus","SL","Bang","Ind","SA","Pak","WI"]
for (index, value) in enumerate(superEight){
println("Team \(index+1) : \(value)")
}
//Teams play for Cricket world cup 2015 super 8
var superEight = ["NZ","Aus","SL","Bang","Ind","SA","Pak","WI"]
//Same typical way
for team in superEight{
println(team)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment