Dart provides operators that can be used to check the relationship between values or values within variables also known asoperands.
All relational operators,less than(<
),less than or equal to(<=
),greater than(>
),greater than and equal to(>=
) gives resultant value inboolean i.e eithertrue
orfalse
after evaluation.
In this article, you will findRelational 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 variablesinta=10,b=12;// value of a and bprint('Valueofais$aandbis$b');// > operatorprint(a>b);// false// < operatorprint(a<b);// true// >= operatorprint(a>=b);// false// <= operatorprint(a<=b);// true}
Read the complete post on our siteDart - Relational Operators
Read others post on our siteMeshWorld
Hope you like this!
Keep helping and happy 😄 coding
Top comments(0)
Subscribe
For further actions, you may consider blocking this person and/orreporting abuse