Sometimes we want our program to do different things depending upon the value that we currently have. So in other words, we wanted to go different paths. We don't want our program to just run and keep executing line by line, we wanted to do smart things depending upon the value. And for example, if we have a gender variable, and the gender could be male or female, we wanted to do different things for male if the value is male, than if it was a female. And to accomplish that, we use two different operators. The first one is the switch.
The other one is if statement