nil은 옵셔널을 통해서만 할당할 수 있다.
nil
옵셔널
optional(nil)은 없다.
optional(nil)
optional unwrapping에서 if let을 사용할 때 조건을 지정해줄 수 있음
optional unwrapping
if let
조건
var testValue : Int? = 10 if let value = testValue, testValue > 20 { // testValue가 nil이 아니고, // testValue 20보다 클 때 // 둘다 만족해야 }else{ }