Skip to main content
0

Many choices, one clean switch

A long else if chain is hard to read. switch lines the choices up, runs only the one that matches, and never slides into the next case by accident.