Introduction
The when expression helps you choose what to do based on different values. Using multiple conditions lets you check several options together in one place.
You want to run the same code for several possible values.
You have a variable that can be one of many things and want to handle groups of them similarly.
You want to keep your code clean by combining cases instead of writing many separate checks.