Skip to content

Commit

Permalink
docs: udpate
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 committed Dec 3, 2021
1 parent b095205 commit a26dd15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/rules/prefer-object-has-own.md
Expand Up @@ -2,7 +2,7 @@

`Object.hasOwn(…)` is more accessible than `Object.prototype.hasOwnProperty.call(…)`.

It is recommended over Object.hasOwnProperty() because it works for objects created using Object.create(null) and with objects that have overridden the inherited hasOwnProperty() method.
It is recommended over `Object#hasOwnProperty()` because it works for objects created using `Object.create(null)` and with objects that have overridden the inherited `hasOwnProperty()` method.

## Rule Details

Expand Down Expand Up @@ -30,4 +30,4 @@ const hasProperty = Object.hasOwn(object, property);

## Related Material

[MDN documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwn)
* [Object.hasOwn()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwn)

0 comments on commit a26dd15

Please sign in to comment.