Swift - Optionals
What will be printed when this Swift code runs?
func checkAge(_ age: Int?) {
guard let age = age, age >= 18 else {
print("Access denied")
return
}
print("Access granted")
}
checkAge(nil)
checkAge(20)