Google News
logo
Swift - Interview Questions
What is Optional Chaining Swift Programming Language?
Optional chaining is a useful process which we can use in combination with the optional to call the methods, properties, and subscripts on the optionals and these values may or may not be nil. In this process, we may try to retrieve a value from a chain of the optional values.
 
* If the optional contains a value, then calling the subscript, method or property of an optional will return a value.
* If optional is nil, then calling the subscript, method and property will return nil.
Advertisement