October 2017
Beginner to intermediate
236 pages
7h 38m
English
Sometimes, you are in a situation where you will execute one task from a list of alternatives based on a conditional value of another variable. In this case, you have two ways of doing it, either using the switch function or a series of the if…else if…else statement. The question is which one performs better. In this recipe, you will assess the performance of these two alternatives.