swift & iOS/swift

[swift] 빈 딕셔너리 dictionary 선언하기

whale3 2022. 2. 7. 11:25
var myDict = [String:Int]()
var secondDict : Dictionary<String,Int> = [:]

 

딕셔너리에 초기값이 있다면 

var thirdDict = ["one":1, "two":2]
반응형