mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-09-02 22:02:39 +02:00
Add content to Object.is (#6460)
Added description to Object.is in the JavaScript roadmap before without content.
This commit is contained in:
@@ -1 +1,21 @@
|
||||
# Object.is
|
||||
# Object.is
|
||||
|
||||
The Object.is() static method determines whether two values are the same value.
|
||||
|
||||
```js
|
||||
console.log(Object.is('1', 1));
|
||||
// Expected output: false
|
||||
|
||||
console.log(Object.is(NaN, NaN));
|
||||
// Expected output: true
|
||||
|
||||
console.log(Object.is(-0, 0));
|
||||
// Expected output: false
|
||||
|
||||
const obj = {};
|
||||
console.log(Object.is(obj, {}));
|
||||
// Expected output: false
|
||||
```
|
||||
Visit the following resources to learn more:
|
||||
|
||||
- [@article@Object.is() - MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is)
|
||||
|
Reference in New Issue
Block a user