?
" is used in property declaration. It tells the compiler that this property is optional. The property may hold a value or not. It avoids runtime errors when accessing that property by using ?. This is useful in optional chaining and a variant of this example is in conditional clauses.var optionalName : String? = "Chanti"
if optionalName != nil {
print("Your name is \(optionalName!)")
}