In swift documentation, you can find this :
if convertedNumber != nil {
println("convertedNumber has an integer value of \(convertedNumber!).")
}
// prints "convertedNumber has an integer value of 123."
With this explaination
Once you’re sure that the optional does contain a value, you can access its underlying value by adding an exclamation mark (!) to the end of the optional’s name. The exclamation mark effectively says, “I know that this optional definitely has a value; please use it.” This is known as forced unwrapping of the optional’s value:
Ok, got it, but what's the usefulness of it ? Wouldn't be the same if I didn't forced the unwrapping like :
if convertedNumber != nil {
println("convertedNumber has an integer value of \(convertedNumber).")
}
// prints "convertedNumber has an integer value of 123."
Thank for enlightening me :)