Boolean

noun

say it: “BOO-lee-un” /ˈbuliən/

A type of value that can only be true or false, used to answer yes-or-no questions in code.

What is a boolean?

A boolean is a datatype that can only be either true or false.

Boolean is a basic or primitive data type that is available in every programming language.

In a sentence

  • “The comparison age >= 18 gives back a Boolean.”
  • “is_member is a Boolean: it's either True or False.”

Level: Novice · More General terms at this level

Updated

In other subjects