Skip to main content

Command Palette

Search for a command to run...

Dart Equality and relational operators

Updated
2 min read
Dart Equality and relational operators
V

"Hello World, I'm Vinit Mepani, a coding virtuoso driven by passion, fueled by curiosity, and always poised to conquer challenges. Picture me as a digital explorer, navigating through the vast realms of code, forever in pursuit of innovation.

In the enchanting kingdom of algorithms and syntax, I wield my keyboard as a magical wand, casting spells of logic and crafting solutions to digital enigmas. With each line of code, I embark on an odyssey of learning, embracing the ever-evolving landscape of technology.

Eager to decode the secrets of the programming universe, I see challenges not as obstacles but as thrilling quests, opportunities to push boundaries and uncover new dimensions in the realm of possibilities.

In this symphony of zeros and ones, I am Vinit Mepani, a coder by passion, an adventurer in the digital wilderness, and a seeker of knowledge in the enchanting world of code. Join me on this quest, and let's create digital wonders together!"

  • This type operators are use for comparation between two more variables.

Here, I have mentioned operator and their meaning and in last I have put example as well to better understand.

Operator SymbolOperator NameOperator Description
>Greater thanCheck which operand is bigger and give result as boolean expression.
<Less thanCheck which operand is smaller and give result as boolean expression.
>=Greater than or equal toCheck which operand is greater or equal to each other and give result as boolean expression.
<=less than equal toCheck which operand is less than or equal to each other and give result as boolean expression.
\==Equal toCheck whether the operand are equal to each other or not and give result as boolean expression.
!=Not Equal toCheck whether the operand are not equal to each other or not and give result as boolean expression.
void main(){
   var x = 20, y = 30;
   print("x > y is: ${x > y}");
   print("x < y is: ${x < y}");
   print("x >= y is: ${x >= y}");
   print("x <= y is: ${x <= y}");
   print("x == y is: ${x == y}");
   print("x != y is: ${x != y}");
}

/* Output 

x > y is: false
x < y is: true
x >= y is: false
x <= y is: true
x == y is: false
x != y is: true
*/

Learn Dart

Part 1 of 50

Dive into the Dart Language Series for an easy grasp of Dart programming essentials.

More from this blog

Vinit Mepani (Flutter Developer)

270 posts

"Vinit Mepani, passionate coder! Dive into my Dart and Flutter journey on the blog. Let's master these tech wonders together. Happy coding! 🚀"