JavaScript » Operators » Comparison

A comparison operator compares two operands and returns a Boolean value (true or false) as to the validity of the comparison. Operands can be of numeric or string type.
 

!=

This is the not equal operator which returns a Boolean true if both the operands are not equal.

!==

This is the strict not equal operator and only returns a value of true if both the operands are not equal and/or not of the same type.

<

This is the less than operator and returns true if the left operand is less than the right.

<=

This is the less than or equal operator and returns true if the first operand is less than or equal to the second.

==

This is the equal operator and returns a boolean true if both the operands are equal.

===

>

This is the greater than operator and returns a value of true if the left operand is greater than the right.

>=

This is the greater than or equal operator, which returns true if the first operand is greater than or equal to the second.