[Solved] Why do we structure else-if as such? [duplicate]
The reason one would prefer one style over the other is to ensure either the presence or lack of mutual exclusion when testing the conditions. If it is the case that Condition B, C, or D are not mutually exclusive with one another, then… …in the first scenario, only Condition B would fire, due to … Read more