An if-statement is a two-way conditional statement. The "test" part evaluates to either true or false, no other possibilities, and either the statements in the "then" part get executed, or the statements in the "else" part get executed. No other possibilities.
A switch-statement is a multi-way conditional statement. Not just two possible outcomes, but any number of outcomes.
|
|