Ways to Unwrap Optionals in Swift

In this post I will explain all the possible ways to unwrap an optional in Swift. Lets look at them one by one with their uses and consequences of using them Force Unwrapping This is the easiest way to unwrap an optional and that’s why tempting. You need to just put exclamation mark (!) after… Continue reading Ways to Unwrap Optionals in Swift

guard In Swift

guard keyword, as the name suggests, guards the execution in Swift. Either you meet the condition, or just get out of here. The syntax for guard goes like this If you know swift you would be knowing that the condition here should be Bool. The else clause is compulsory with guard. If the condition in… Continue reading guard In Swift