「Swift3入門」enumeratedで配列の要素をループするサンプル

サンプルコード

let stations = ["gotanda", "shinagwa", "oosaki", "meguro","shibuya"]
for (index, cft) in stations.enumerated() {
    print("\(cft)") 
}

 

Swift

Posted by arkgame