Skip to content

What is Boolean?

Last updated on September 25, 2019

The dictionary term of boolean denotes as “a binary variable that can have one of two possible values, 0 (false) or 1 (true).” Basically, booleans is either true or false and is also referred as logical because they are either true or false.

The best thing about a boolean is even if you are wrong, you are only off by a bit.

Annoymous

In this tutorial, you’ll learn what is boolean. You’ll learn:

  • The basic of boolean.

Prerequisites

To follow along this tutorial, you’ll need some basic knowledge in:

  • Basic familiarity in Swift.
  • At least Xcode 7.1.

Basic of Boolean

Boolean is particularly useful when it comes to conditional statement such as the if statement.

The code above basically means we have created a variable by storing a boolean value of true and if it is true, print “Mmmmmm…”

Where to go From Here

If you feel like you are ready to take on more challenges, feel free to check out some other tutorials that we have created:

Published inSwift

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *