You've probably heard that computers think in ones and zeroes. This is true.
In the black-and-white world of computers, we have a type of data that can be only one of two values:
false. These are called Boolean values.
Try running this code in the editor:
Notice how it doesn't throw an error, but returns
true as the result? Both
Many aspects of programming are built on Boolean values. We can make something happen only if a condition is
false. We can use these values to represent on/off switches in user settings or app configuration.
Now that you know what a Boolean value is, we can start working with them.