fix(curriculum): step 89 hasOwnProperty fix (#55791)
Some checks are pending
i18n - Build Validation / Validate i18n Builds (20.x) (push) Waiting to run
CI - Node.js / Lint (20.x) (push) Waiting to run
CI - Node.js / Build (20.x) (push) Blocked by required conditions
CI - Node.js / Test (20.x) (push) Blocked by required conditions
CI - Node.js / Test - Upcoming Changes (20.x) (push) Blocked by required conditions
CI - Node.js / Test - i18n (italian, 20.x) (push) Blocked by required conditions
CI - Node.js / Test - i18n (portuguese, 20.x) (push) Blocked by required conditions

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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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.