Skip to content

Commit 326bbdb

Browse files
Update hints.md
Some hints were outdated.
1 parent d6631bf commit 326bbdb

File tree

1 file changed

+8
-8
lines changed
  • exercises/concept/recycling-robot/.docs

1 file changed

+8
-8
lines changed

exercises/concept/recycling-robot/.docs/hints.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,22 @@
4141
- `typeof` returns a string.
4242
- You can check the length of an array to find out how many elements it contains.
4343

44-
## 8. Throw an error if an object does not have the `id` property
44+
## 8. Throw an error if an object does not have the `id` property or method
4545

46-
- You can use the `in` operator or the `Object.hasOwn()` function to check if an object has a property.
47-
- If the `id` property is missing, your function should throw an `Error`.
46+
- You can use the `in` operator to check if an object has a property or method.
47+
- If the `id` property or method is missing, your function should throw an `Error`.
4848

49-
## 9. Check if an object has a `type` property
49+
## 9. Check if an object has a `type` property or method
5050

51-
- You can use the `in` operator or the `Object.hasOwn()` function to check if an object has a property.
51+
- You can use the `in` operator to check if an object has a property or method.
5252

53-
## 10. Check if an object has a `constructor` property
53+
## 10. Check if an object has an `id` property
5454

55-
- All class instances have a `constructor`, but `Object.hasOwn()` is able to ignore this.
55+
- To check if an object has a property (not a method), you can use the `Object.hasOwn()` function.
5656

5757
## 11. Check if an object has a defined `type` property
5858

59-
- You can use the `in` operator or the `Object.hasOwn()` function to check if an object has a property.
59+
- To check if an object has a property (not a method), you can use the `Object.hasOwn()` function.
6060
- You will have to access the `type` property and check if it is defined.
6161

6262
[isNaN]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isNaN

0 commit comments

Comments
 (0)