// Tutorial //

What is a Boolean?

Published on December 16, 2020
Default avatar
By Brian Boucheron
Developer and author at DigitalOcean.
What is a Boolean?

A Boolean is a data type which has one of only two possible values: true or false. Booleans represent the truth values that are associated with the logic branch of mathematics, which informs algorithms in computer science. In programming, Booleans are used to make comparisons and to control the flow of a program.

For more resources about booleans, please visit:

A complete list of our development-related tutorials, questions, and other educational resources can be found on our development tag page.

If you’ve enjoyed this tutorial and our broader community, consider checking out our DigitalOcean products which can also help you achieve your development goals.

Learn more here


About the authors
Default avatar
Developer and author at DigitalOcean.

Still looking for an answer?

Was this helpful?
Leave a comment

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!