The JavaScript Switch Statement
Yesterday we talked about if and else. Today we are going to discuss an alternative, the switch statement, which is the fourth conditional available to us. While not as common as if statements, switch statements have their place to shine, providing a number of advantages…