Choose between many exact values without a long if chain.
In this video:
switch (value) { ... }compares one value with eachcasecase 1:runs when the value is 1default:runs when no case matchesbreak;leaves the switch; without it, the code of the next cases runs too ("falls through")- Several cases written one after another share the same code