## Logical Operators

Logical Operators are used to perform basic logic gate operators like AND, OR, and NOT. The following table lists out all the logical operators in Dart programming.

## Example

In the following program, we will take boolean values in variables `x` and `y`, and perform logical operations on these values using Dart Logical Operators.

main.dart

```void main() {
var x = true;
var y = false;

var andOutput = x &amp;&amp; y;
var orOutput = x || y;
var notOutput = !x;

print('x &amp;&amp; y = \$andOutput');
print('x || y = \$orOutput');
print('!x = \$notOutput');
}
```

Output

```x &amp;&amp; y = false
x || y = true
!x = false
```

## Logical Operators Tutorials

The following tutorials cover each of the Arithmetic Operators in Dart, in detail with examples.

• ANDDart Tutorial about logical AND operator, its syntax, truth table, and usage with examples. AND operator is used when we need to check if given two conditions must be met.
• ORDart Tutorial about logical OR operator, its syntax, truth table, and usage with examples. OR operator is used when we need to check if at least one of the two given conditions must be met.
• NOTDart Tutorial about logical NOT operator, its syntax, truth table, and usage with examples.

## Conclusion

In this Dart Tutorial, we learned about all the Logical Operators in Dart programming, with examples.