I know what guard
does in Swift. I have read the questions about using guard
or if let
. However, is there any difference between guard (condition) else { return }
and if !condition { return }
? They seem to do the same thing.
EDIT: This was not asking about guard let
and if let
. I now know that guard let
is a more useful usage of guard
. I was simply asking about the differences between a simple guard
and if
.