This is probably a known fact to most people, but I decided to blog about it for those who aren't aware. Two new comparison operators have been introduced since JavaScript 1.3, strict equal (===) and strict not equal (!==). Strict equal (===) returns true if the operands are equal and of the same type. Sounds pretty straightforward, then what's the difference between (==) and (===) ?. Well, when you use the normal equality (==), JavaScript tries to convert both operands to be of the same type, before doing the comparison.

Let's look at some examples:
var one = 1;
one == '1';
>>> true
one === '1';
>>> false

var two;
two === undefined;
>>> true
two == undefined;
>>> true
two === null;
>>> false
two == null;
>>> true