Hi my question is about the difference between the Force unwrap (!) and the optional chaining (??), specifically in the context of the below line of code from the playground Hello World example.
let helloReference = capability!.borrow()
?? panic(“Could not borrow a reference to the hello capability”)
My understanding is that because the
capability is optional, we use the force unwrap to abort the code in the case
nil. Then, what function does the
?? serve? I thought the
?? is what is referred to here as Nil-Coalescing Operator.