Working with swift optionals?
Example:
var name: String? = "John"
print(name) // Outputs: Optional("John")
Solution:
You can use if let or guard to safely unwrap the optional value.
Example: Solution: You can use if let or guard to safely unwrap the optional value.Working with swift optionals?
var name: String? = "John"
print(name) // Outputs: Optional("John")