Add content to Object.is (#6460)
Added description to Object.is in the JavaScript roadmap before without content.pull/6470/head
parent
eea6275571
commit
27752cf374
1 changed files with 21 additions and 1 deletions
@ -1 +1,21 @@ |
||||
# 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) |
||||
|
Loading…
Reference in new issue