To be able to do anything interesting, a Swift program needs to take decisions based on whether some condition is true or not. This is done through conditionals.
Swift has several conditionals. The most common one is the if statement, which we will cover in this article.



