SwSwift · Lesson 3 of 8
Functions & Control Flow
Swift function signatures read like sentences — argument labels are part of the design. Plus switch, which is so capable it replaces most if-chains.
◆ Note
Swift switch statements must cover every possible value — add default or cover all cases. Combined with enums (next lesson) the compiler literally tells you when you forgot to handle a case.
Swift switch statements must cover every possible value — add default or cover all cases. Combined with enums (next lesson) the compiler literally tells you when you forgot to handle a case.