import UIKit
//** Collection
//** Keys - Value
//** Dictionary<Key, Value>
//** Dictionary定義
var namesOfIntegers = [Int: [String]]()
var namesOfIntegers2 = [Int: String]()
//** nameOfInteger[Key] = [Value] Array
namesOfIntegers[1] = ["one", "love"]
namesOfIntegers[2] = ["two", "dvah"]
//** nameOfInteger[Key] = Value
namesOfIntegers2[0] = "Hello"
namesOfIntegers2[1] = "World"
//** Value 出力
print(namesOfIntegers2[0])
print(namesOfIntegers2[1])
//** Array Value 出力
print(namesOfIntegers[2]?[1])
print(namesOfIntegers[1]?[0])
댓글 없음 :
댓글 쓰기