Last active
August 29, 2015 14:17
-
-
Save mlvea/69569fb660013f978620 to your computer and use it in GitHub Desktop.
Objective c array enumeration in swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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)") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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