Before object.is, we compare values using the two equal sign "= =" or the three equal sign "= =", the three equals is more rigorous, as long as the comparison of the two types of different immediately return false.
In addition, there is and only one value is not equal to itself, it is Nan
Now ES6 added a object.is, let comparison operation of the river is more chaotic.
In most cases object.is is equivalent to "= =", as follows
1 = = 1//True
object.is (1, 1)//True
' a ' = = = = ' A '/true
object.is (' A ', ' a ')//true
= = TRUE//t Rue
Object.is (True, True)//true
NULL = NULL/TRUE
object.is (null, NULL)/true
undefined = = = Undef ined//True
object.is (undefined, undefined)/true
But for Nan, 0, +0,-0, and "= =" is different
Nan = = nan//False
object.is (Nan, Nan)//true
0 = = 0/True
object.is (0, -0)//False
-0 = +0 True
object.is ( -0, +0)//False
The above is about JavaScript ES6 the new value-added comparison function object.is all content, hope to everybody's study work can help.