fix(curriculum): step 89 hasOwnProperty fix (#55791)

Co-authored-by: Jessica Wilkins <67210629+jdwilkin4@users.noreply.github.com>
This commit is contained in:
Gagan Bhullar
2024-08-09 00:42:29 -06:00
committed by GitHub
parent 29334e46ee
commit 119bfdf9b9

View File

@@ -11,6 +11,22 @@ Update the callback function to take `match`, `fn`, and `args` as parameters. It
Remember to make `fn` lower case.
To check if a property on a given object exists or not, you can use the <dfn>hasOwnProperty()</dfn> method.
The `hasOwnProperty()` method returns `true` or `false` depending on if the property is found on the object or not.
Here is an example of how to use the `hasOwnProperty()` method:
```js
const developerObj = {
name: 'John',
age: 34,
}
developerObj.hasOwnProperty('name'); // true
developerObj.hasOwnProperty('salary'); // false
```
# --hints--
Your callback function should have `match` as the first parameter.