Chapter 5. Computers make decisions, too!

This chapter is all about how to write code that makes decisions.

This chapter covers

  • What conditions are
  • How to use conditions to make decisions in programming
  • How to use a basic if statement in condition checking
  • How to use the else and else if clauses with the if statement
  • What the basic conditional operators are
  • What the switch statement is and how to use it

You’re all set to cover your fifth milestone: Computers make decisions, too! You make decisions all the time. You decide ...

Get Hello Swift! now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.