// Key-Value対応を維持してfor-eachする for (key, value) in dictionary { println("\(key) is \(value)") } // Keyだけfor-each for key in dictionary.keys { println("dictionary contains '\(key)' as key") }
// Key-Value対応を維持してfor-eachする for (key, value) in dictionary { println("\(key) is \(value)") } // Keyだけfor-each for key in dictionary.keys { println("dictionary contains '\(key)' as key") }