Booleans in Swift

🆕 🔜 Check this out if you dream of running a solo Internet business 🏖️

This tutorial belongs to the Swift series

Swift provides the Bool type, which can have two values: true and false.

var done = false
done = true

Booleans are especially useful with conditional control structures like if statements or the ternary conditional operator:

var done = true

if done == true {