December 2015
Intermediate to advanced
400 pages
13h 3m
English
guard statements support the use of where clauses.
Using a where clause with a guard statement gives you further control over the statement’s condition.
Refactor the greetByMiddleName(_:) function to have a where clause in its guard statement.
This where clause should check to see if the middle name is fewer than 4 characters.
If it is, then greet that person by their middle name.
If it is not, then use the generic greeting.
Read now
Unlock full access