Possible Duplicate:
Javascript === vs == : Does it matter which “equal” operator I use?
Not really relative to any type of code, just in general?
Possible Duplicate:
Javascript === vs == : Does it matter which “equal” operator I use?
Not really relative to any type of code, just in general?
usually ===
also represents equality of type.
so:
1 == "1" //true
1 === "1" //false
=== compares the value as well as type of variable
== doesn't compare type