Guard ensures conditions are met, otherwise it exits the current scope.
← Swift theorytheory 0/50 · 0%
Fundamentals · easy
13. Guard Statement
Early exit.
Check your understanding
1. Required keyword in guard?
2. Variables defined in guard...?
Early exit.
Guard ensures conditions are met, otherwise it exits the current scope.
1. Required keyword in guard?
2. Variables defined in guard...?