August 2016
Beginner to intermediate
847 pages
17h 28m
English
There's another set of operators that all return a Boolean value as a result of the operation. These are the comparison operators. The following table lists them together with example uses:
|
Operator symbol |
Description |
Example |
|---|---|---|
|
|
Equality comparison: Returns true when both operands are equal. The operands are converted to the same type before being compared. Also called loose comparison. |
> 1 == 1;
true
> 1 == 2;
false
> 1 == '1';
true
|
|
|
Equality and type comparison: Returns |
> 1 === '1';
false
> 1 === 1;
true
|
|
|
Non-equality ... |