
A switch statement compares a single value against multiple cases — cleaner than a long chain of else if blocks when you have many discrete options. Always include a break after each case to prevent fall-through, and always include a default case to handle unexpected values.
Reference:
TaskLoco™ — The Sticky Note GOAT