| Rules that are uses in === operands
The identity operator checks whether two operands are identical or not.
These rules determine whether two values are identical:
(i)They have to have the same type or not.
(ii)If number values have the same value they are identical, unless one or both are NaN.
(iii)If string values have the same value they are identical, unless the strings differ in length or content.
(iv)If both values refer to the same object, array or function they are identical.
(v)If both values are null or undefined they are identical. | | |