Skip to content

Commit b2f9c88

Browse files
authored
Object.is
1 parent 63d7d7d commit b2f9c88

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,3 +272,21 @@ const { name: pageName } = obj;
272272
console.log(pageName) // JSsnippets
273273
```
274274
275+
276+
277+
# The Object.is() method determines whether two values are the same value
278+
279+
280+
```javascript
281+
Object.is('foo', 'foo'); // true
282+
283+
Object.is(null, null); // true
284+
285+
Object.is(Nan, Nan); // true 😱
286+
287+
const foo = { a: 1 };
288+
const bar = { a: 1 };
289+
Object.is(foo, foo); // true
290+
Object.is(foo, bar); // false
291+
292+
```

0 commit comments

Comments
 (0)