Skip to content

Commit 48996bd

Browse files
Merge pull request #1 from quintuple-mallard/add-assembly-line
rename Assembly Line to Recycling Robot
2 parents a0f87e6 + f6ad93f commit 48996bd

File tree

15 files changed

+804
-804
lines changed

15 files changed

+804
-804
lines changed

config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,8 @@
438438
]
439439
},
440440
{
441-
"slug": "assembly-line",
442-
"name": "Assembly Line",
441+
"slug": "recycling-robot",
442+
"name": "Recycling Robot",
443443
"uuid": "16114449-52fe-470e-af11-cf9dc3689a93",
444444
"concepts": [
445445
"type-checking"
Lines changed: 62 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,62 @@
1-
# Hints
2-
3-
4-
## 1. Check if a value is a boolean
5-
6-
- You can use `typeof` to find the type of a value.
7-
- `typeof` returns a string.
8-
9-
## 2. Check if a value is a number.
10-
11-
- You can use `typeof` to find the type of a value.
12-
- `typeof` returns a string.
13-
- You need to check for `Infinity` and `NaN`.
14-
- `NaN` is never equal to itself, but there is a [built in function][isNaN] to check if a value is NaN.
15-
16-
## 3. Check if a value is an object
17-
18-
- You can use `typeof` to find the type of a value.
19-
- `typeof` returns a string.
20-
- You will need to check for `null`.
21-
22-
## 4. Check if a string is numeric
23-
24-
- You can use `typeof` to find the type of a value.
25-
- `typeof` returns a string.
26-
- You can iterate over a string to check if all characters are digits.
27-
28-
## 5. Check if an object is electronic
29-
30-
- You can use `instanceof` to check if an object is an instance of a class or one of its children.
31-
32-
## 6. Check if a value is a non empty array
33-
34-
- You can use `typeof` to find the type of a value.
35-
- `typeof` returns a string.
36-
- You can check the length of an array to find out how many elements it contains.
37-
38-
## 7. Check if a value is an empty array
39-
40-
- You can use `typeof` to find the type of a value.
41-
- `typeof` returns a string.
42-
- You can check the length of an array to find out how many elements it contains.
43-
44-
## 8. Throw an error if an object does not have the `id` property
45-
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`.
48-
49-
## 9. Check if an object has a `type` property
50-
51-
- You can use the `in` operator or the `Object.hasOwn()` function to check if an object has a property.
52-
53-
## 10. Check if an object has a `constructor` property
54-
55-
- All class instances have a `constructor`, but `Object.hasOwn()` is able to ignore this.
56-
57-
## 11. Check if an object has a defined `type` property
58-
59-
- You can use the `in` operator or the `Object.hasOwn()` function to check if an object has a property.
60-
- You will have to access the `type` property and check if it is defined.
61-
62-
[isNaN]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isNaN
1+
# Hints
2+
3+
4+
## 1. Check if a value is a boolean
5+
6+
- You can use `typeof` to find the type of a value.
7+
- `typeof` returns a string.
8+
9+
## 2. Check if a value is a number.
10+
11+
- You can use `typeof` to find the type of a value.
12+
- `typeof` returns a string.
13+
- You need to check for `Infinity` and `NaN`.
14+
- `NaN` is never equal to itself, but there is a [built in function][isNaN] to check if a value is NaN.
15+
16+
## 3. Check if a value is an object
17+
18+
- You can use `typeof` to find the type of a value.
19+
- `typeof` returns a string.
20+
- You will need to check for `null`.
21+
22+
## 4. Check if a string is numeric
23+
24+
- You can use `typeof` to find the type of a value.
25+
- `typeof` returns a string.
26+
- You can iterate over a string to check if all characters are digits.
27+
28+
## 5. Check if an object is electronic
29+
30+
- You can use `instanceof` to check if an object is an instance of a class or one of its children.
31+
32+
## 6. Check if a value is a non empty array
33+
34+
- You can use `typeof` to find the type of a value.
35+
- `typeof` returns a string.
36+
- You can check the length of an array to find out how many elements it contains.
37+
38+
## 7. Check if a value is an empty array
39+
40+
- You can use `typeof` to find the type of a value.
41+
- `typeof` returns a string.
42+
- You can check the length of an array to find out how many elements it contains.
43+
44+
## 8. Throw an error if an object does not have the `id` property
45+
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`.
48+
49+
## 9. Check if an object has a `type` property
50+
51+
- You can use the `in` operator or the `Object.hasOwn()` function to check if an object has a property.
52+
53+
## 10. Check if an object has a `constructor` property
54+
55+
- All class instances have a `constructor`, but `Object.hasOwn()` is able to ignore this.
56+
57+
## 11. Check if an object has a defined `type` property
58+
59+
- You can use the `in` operator or the `Object.hasOwn()` function to check if an object has a property.
60+
- You will have to access the `type` property and check if it is defined.
61+
62+
[isNaN]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isNaN

0 commit comments

Comments
 (0)