In the quick documentation you can find this:
if convertedNumber != nil {
println("convertedNumber has an integer value of \(convertedNumber!).")
}
With this explanation
Once you verify that an option contains a value, you can access its base value by adding an exclamation mark (!) To the end of the option name. The exclamation point effectively says: "I know that this does not necessarily have value, please use it." This is called forced expansion of the option value:
Well, I get it, but what's the use of it? It would not be the same if I did not force to unfold as:
if convertedNumber != nil {
println("convertedNumber has an integer value of \(convertedNumber).")
}
Thank you for enlightening me :)
source
share