Module 5 · Decisions
switch, case and Fall Through
Free with an accountReading
David wrote the menu for his café's order screen: 1 for tea, 2 for coffee, 3 for juice. A customer pressed 2.
Checking what this lesson needs for you…
What is inside switch, case and Fall Through
- switch: one value, many constants
- break, and what happens without it
- default, and where it goes
- Grouping cases, and switching on a char
- Fall through on purpose, with a comment
- What switch cannot test
- switch or an else if ladder?