0PricingLogin
Dart Academy · Lesson

Booleans and Comparison Operators

Produce true and false from comparisons.

Yes or No, True or False

Every decision your program makes starts with a yes-or-no answer. In Dart that answer is a bool, which holds only true or false. 🤔

Declaring a bool

You store a yes-or-no value in a variable typed as bool. It can hold the literal true or the literal false, and nothing else.

bool isReady = true;
bool isDone = false;

All lessons in this course

  1. Booleans and Comparison Operators
  2. if, else if, and else
  3. Logical Operators and Short-Circuiting
  4. The Ternary and switch Expression
← Back to Dart Academy