Swift - Optionals
What will be the output of this Swift code?
var name: String? = "Alice" print(name)
var name: String? = "Alice" print(name)
Optional(value) if it has a value.name holds the string "Alice", so printing it shows Optional("Alice").15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions