<stands for less than. So
a < bchecks whether
ais less than
bor not, and if that's true, then it evaluates to true, else it evaluates to false.
<=means less than OR equal to. So
a <= bcheckes whether
ais less than OR equal to
b. If any of those are true, then it evaluates to true. Else it evaluates to false.
>=are similar to the above examples, but in the reverse order.
===checks whether 2 operands are strictly equal or not. So,
a === bchecks whether
bare strictly equal or not. By strictly, I mean, their types (strings, numbers, etc.) should be same and the values should also be same. It is recommended to use
==does some conversion (type coercion) when the 2 operands are of different types, causing weird bugs. So
1234 == '1234'is true while
1234 === '1234'evaluates to false.
This understanding will help us write our programs better, and make sure that we don't produce bugs by using the incorrect operator.
Note: String comparison is based on ASCII. Here's the ASCII Table: http://www.asciitable.com/
Warning: Invalid argument supplied for foreach() in /var/www/cssdeck/app/modules/labs/views/_details.php on line 68