Logical Operators
Get introduced to logical operators in Dart.
We'll cover the following
Types of logical operators
Logical operators are operators that perform logic operations such as the Logical AND and Logical OR. They take bool
type operands and yield bool
type results. Below is a list of the logical operators supported by Dart.
Operator | Name | Use |
---|---|---|
! |
Logical NOT | Reverses the logical state of its operand. If a condition is true, then the Logical NOT operator will make it false |
|| |
Logical OR | If any of the two operands is not false, then the result is true |
&& |
Logical AND | If both the operands are not false, then the result is true |
!
is a unary operator, i.e., it takes one operand.
Create a free account to access the full course.
Continue your learning journey with a 14-day free trial.
By signing up, you agree to Educative's Terms of Service and Privacy Policy