Section outline

  • The "programs" in unit 2 were linear; but real programs need to make decisions. Selection statements  allow your code to branch off in different directions based on specific conditions. If a certain condition is met, the program does one thing; if not, it does something different.

    Language elements: ifelif | else | match | case