Image not visible
Chapter - 2 : Comparison Operators

#1 "==" Equal to

It checks whether the value of two operands are equal or not. If the value is equal it will return true otherwise it will return false .
Try it by checking the following numbers in the code 2 == 3

#2 "===" equal value and same type

It checks whether the value of two operands are equal or not and also whether both the operands are of same datatype or not. If the value is equal and the operands are of same datatype then it will return true otherwise it will return false .
Try it by checking the following numbers in the code 2 === "2"

#3 "!=" not equal to

It checks whether the value of two operands are equal or not. If the value is not equal then it will return true otherwise it will return false .
Try it by checking the following numbers in the code 2 != "2"

#4 "!==" equal value and same type

It checks whether the value of two operands are equal or not and also whether both the operands are of same datatype or not. If the value is equal and the operands are not of same datatype then it will return true otherwise it will return false .
Try it by checking the following numbers in the code 2 !== "2"

#5 ">" Greater than

It checks whether the value of left operand is greater than the value of right operand or not. If the value of the left operand is greater than teh right operand then it will return true otherwise it will return false . Try it by checking the following numbers in the code 3 > 2

#6 ">=" greater than or equal to

It checks whether the value of left operand is greater than or equal to the value of right operand or not. If the value of the left operand is greater than or equal to right operand then it will return true otherwise it will return false . Try it by checking the following numbers in the code 3 >= 3

#7 "<" less than

It checks whether the value of left operand is less than the value of right operand or not. If the value of the left operand is less than the right operand then it will return true otherwise it will return false . Try it by checking the following numbers in the code 4 < 2

#8 "<=" less than or equal to

It checks whether the value of left operand is greater than or equal to the value of right operand or not. If the value of the left operand is greater than or equal to right operand then it will return true otherwise it will return false . Try it by checking the following numbers in the code 4<=4