3 AnswersNew Answer
Hi Julie, you are right. It's basically a list of simple equality tests on one variable. Ayush, I think you might have overshot a little making it too simple. The switch-statement only allows branching on a single variable without negation (you can't do "not" in the switch-statement). The if-statement can do *much* more, e.g. not just equals expressions as *all* comparison operators are available (not, greater than etc.) and you can therefore also express a lot more.
Wouldn't using multiple if statements be the same as a switch except the switch requires less typing.
Adam, you are right. Unfortunately, Ayush removed his answer I was referring to. In his answer he basically stated that the switch statement is a "simple" version of the list if statements. This still hold true, so there's a good reason for the switch statement to exist: it simplicity helps to understand what you want to express.