Using Strict Equality
great, but what does that gobbledygook mean? What it actually means is that, despite the fact that values with different data types look the same, in fact, they are not equal..
The primary (primitive) data types are:
The composite (reference) data types are:
The special data types are:
The expressions in the following example all evaluate to true.
"100" == 100; //text and number
false == 0; //boolean and number
If you want to check that both the type and value are the same, you can use the strict equality operator, ===.
Using this operator, the following both evaluate to false:
"100" === 100;
false === 0;