JavaScript String Comparison

JavaScript String Comparison


JavaScript String Comparison
Comparison operators are used to compare two values.
The comparison operators are as shown below:
 
Operator 
 
 
Example
 
Description
 
==
 
a == b
 
 
Equal to
 
 
!=
 
 
a != b
 
 
Not equal to
>
 
 
a > b
 
Greater than
 
<
 
 
a < b
 
 
Less than
 
 
<=
 
a <= b
 
 
Less than equal to 
 
>= 
 
a >= b
 
Greater than equal to 
 
Example
Output