I noticed that Javascript now has Object.is
and according to the documentation:
Object.is
determines whether two values match the same value.
About this I had some doubts:
-
Why
Object.is
, if I can compare the values with==
or===
? If there is a difference between these forms, what are they? -
Somehow does
Object.is
have any similarity to theinstanceof
operator? This doubt has come to me, since usuallyis
is used in some languages to check if a given value corresponds to a particular object. -
What does
Object.is
bring to Javascript?