Storing Booleans

Sometimes, you need to store answers to simple yes/no questions, such as the following:

  • Is it raining?
  • Are there any available seats at the restaurant?

For this, you use Boolean values. Swift provides a Bool type that can be assigned true or false.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.128.199.138