What is an optional value in Swift?
An optional in Swift is a type that can hold either a value or no value. Optionals are written by appending a ? to any type: var name: String? = “Bertie” Optionals (along with Generics) are one of the most difficult Swift concepts to understand. Because of how they are written and used, it’s easy … Read more