array
let test = "test"
let hello = "hello"
let texts = [test, hello]
texts[0]
var emptyArray: [Int] = []
var emptyArray2 = [Int]()
dictionary
let languageCode = [
"한국" : "ko",
"미국" : "en",
"일본" : "ja",
]
let code = languageCode["한국"]
var test: [String: String] = [:]
var test2 = [String: String]()
set
var test: Set<Int> = [1,2,3,2,4,5,1]
var test2 = Set<Int>([1,2,3,4,1,2])
var empty: Set<Int> = []
enum
enum WeekDay {
case mon
case tue
case wed
case thu
case fri
}
var today: WeekDay = .mon
enum MediaType {
case audio
case video
}
var mediaType: MediaType = .audio
enum MasterLevel: Int = {
case beginner
case intermidiate
case professional
}
var beginner: MasterLevel = .beginner
beginner.rowValue
let pro = MasterLevel(rowValue: 2)