Swift - Optionals
Consider this Swift function:
What will happen if
func checkInput(_ input: String?) {
guard let value = input else {
print("No input provided")
return
}
print("Input: \(value)")
}What will happen if
checkInput(nil) is called?