Students Save 30%! Learn & create with unlimited courses & creative assets Students Save 30%! Save Now

4.4 Guard

Another cool new feature of the Swift 2 language is the guard statement. Guards were added to Swift in order to allow developers to reduce the amount of nested if statements in their code. We can now get rid of deep nesting in a structured, easily understandable way.