Booleans

Booleans (bools) are referred to as logical because they can either be true or false. Use Booleans when you need to determine whether some logic is true or false. For example, did the user log in? This statement would either be true—yes they did, or false—no they did not. So, in Playgrounds, add true and false:

Now, we have covered all of the primary data types in Swift. Right now, we have no way to use these data types. Using the data is where variables and constants come into play.

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

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