April 2017
Intermediate to advanced
316 pages
9h 33m
English
Swift provides if to define conditional statements. It executes a set of statements only if the condition statement is true. For instance, in the following example, the print statement will be executed because anEmptyString is empty:
var anEmptyString = "" if anEmptyString.isEmpty { print("An empty String") } else { // String is not empty. }
Read now
Unlock full access