Every now and than, somebody asks why I am sometimes using three equal signs (===) instead of two (==), when comparing values.
Simple answer is, that I am interested in the identity (type and value) instead of only the value.
alert(2 == "2"); alert(2 === "2");
The first one returns TRUE, because the value is equal. But not their types (number vs. string), therefore the second return FALSE.