DEV Community

Vishnu Damwala
Vishnu Damwala

Posted on • Originally published at meshworld.in

1 1

Dart - Relational Operators

Dart provides operators that can be used to check the relationship between values or values within variables also known as operands.

All relational operators, less than(<), less than or equal to(<=), greater than(>), greater than and equal to(>=) gives resultant value in boolean i.e either true or false after evaluation.

In this article, you will find Relational operators provided by Dart.

Relational operators

  • All of these relational operators are binary operators.
Operator Description Example
< Less than x == y
<= Less than or equal to x != y
> Greater than x == y
>= Greater than or equal to x != y
main() {
  // create variables
  int a = 10, b = 12;

  // value of a and b
  print('Value of a is $a and b is $b');

  // > operator
  print(a > b); // false

  // < operator
  print(a < b); // true

  // >= operator
  print(a >= b); // false

  // <= operator
  print(a <= b); // true
}
Enter fullscreen mode Exit fullscreen mode

Read the complete post on our site Dart - Relational Operators

Read others post on our site MeshWorld

Hope you like this!

Keep helping and happy 😄 coding

Sentry mobile image

App store rankings love fast apps - mobile vitals can help you get there

Slow startup times, UI hangs, and frozen frames frustrate users—but they’re also fixable. Mobile Vitals help you measure and understand these performance issues so you can optimize your app’s speed and responsiveness. Learn how to use them to reduce friction and improve user experience.

Read full post →

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay