JavaScript Comparison Operators
Less Than Operator
< The less than operator returns true if the left operand is less than the right operand. x < y
Less than or equal operator
<= The less than or equal operator returns true if the left operand is less than or equal to the right operand. x <= y
Equality
== The equality operator converts the operands if they are not of the same type, then applies strict comparison. If both operands are objects, then JavaScript compares internal references which are equal when operands refer to the same object in memory. x == y
Strict Equality
=== The identity operator returns true if the operands are strictly equal with no type conversion. x === y
Greater than operator
> The greater than operator returns true if the left operand is greater than the right operand. x > y
Inequality
!= The inequality operator returns true if the operands are not equal. If the two operands are not of the same type, JavaScript attempts to convert the operands to an appropriate type for the comparison. If both operands are objects, then JavaScript compares internal references which are not equal when operands refer to different objects in memory. x != y
Strict Inequality
!== The non-identity operator returns true if the operands are not equal and/or not of the same type. x !== y