I know what the basic idea there is, but I was thinking, and I realized, that it would therefore take MORE characters for a switch statement than for a bunch of if statements.
Since an if
statement has 7 characters (not including the variable name, nor what it is being compared to, nor the code), while the switch statement has 9 characters (same thing), because of the word "break", and even without it, the word "case:" is 5 characters, compared to 7 from the if statement, so it isn't that much better than an if
statement!