iflet1 옵셔널 바인딩 보충 // if let guard let 보충 var isTodayLunch: String? = "된장찌개" if let foodName = isTodayLunch{ print(foodName) } else { print("오늘 점심은 뭐 먹지?") } func isTodayLunch() { var foodName: String? foodName = "김치찌개" guard let name = foodName else { print("오늘 점심은 뭐 먹지?") return } print(name) } isTodayLunch() 2021. 12. 16. 이전 1 다음