| title | ms.custom | ms.date | ms.prod | ms.reviewer | ms.suite | ms.technology | ms.tgt_pltfrm | ms.topic | dev_langs | ms.assetid | caps.latest.revision | author | ms.author | manager | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Object.is Function (JavaScript) | Microsoft Docs |
01/18/2017 |
windows-client-threshold |
|
language-reference |
|
6e2f6c6d-7cd2-47c4-a513-3ba53988d27d |
2 |
mikejo5000 |
mikejo |
ghogen |
Returns a value that indicates whether two values are the same value.
Object.is(value1, value2) value1
Required. The first value to test.
value2
Required. The second value to test.
true if the value is the same value; otherwise, false.
Unlike the == operator, Object.is does not coerce any types when testing values.
The comparison applied by Object.is is similar to the comparison applied by the === operator, except that Object.is treats Number.isNaN as the same value as NaN. It also treats +0 and -0 as different values.
[!INCLUDEjsv12]