Switch statements compare specific values against different cases and execute the block of code associated with the first matching case. You can achieve the same result using an if statement with multiple else clauses, but switch statements are easier to read and understand at a glance.
This article covers the most common use cases of switch statements. There are other, more advanced features of switch statements that I will talk about in future articles.