You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Week3/MAKEME.md
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -84,26 +84,26 @@ Consider the following array:
84
84
let favoriteAnimals = ['blowfish', 'capricorn', 'giraffe'];
85
85
```
86
86
87
-
2\.1 Add a statement that adds Mauro's favorite animal ('turtle') to the existing array
87
+
2\.1 Add a statement that adds Mauro's favorite animal *'turtle'* to the existing array.
88
88
2\.2 Log your new array!
89
-
2\.3 Now add Jim's favorite animal to the array, it's a 'meerkat', but make sure it will be placed after 'blowfish' and before 'capricorn'.
89
+
2\.3 Now add Jim's favorite animal to the array, it's *'meerkat'*, but make sure it will be placed after *'blowfish'* and before *'capricorn'*.
90
90
2\.4 Write a console.log statement that explains in words _you think_ the new value of the array is.
91
91
2\.5 Log your new array!
92
-
2\.6 Log the length of the array, add a message: "The array has a length of: "(here you should show the length of the array)
93
-
2\.7 Jason does not like giraffes, delete this animal from the array
92
+
2\.6 Log the length of the array, add a message: *'The array has a length of: '*(here you should show the length of the array).
93
+
2\.7 Jason does not like *'giraffe'*, delete this animal from the array.
94
94
2\.8 Again log your new array.
95
-
2\.9 Now if unlike Jim, you don't like meerkats and you want to delete it from the array, but you don't know the position or the `index` of the item in the array, how can you find it?
96
-
2\.10 Log the index of meerkat to the console. Add a message so it says: "The item you are looking for is at index: " (here you should show the index of the item)
95
+
2\.9 Now if unlike Jim, you don't like *'meerkat'* and you want to delete it from the array, but you don't know the position or the `index` of the item in the array, how can you find it?
96
+
2\.10 Log the index of *'meerkat'*. Add a message so it says: *'The item you are looking for is at index: '* (here you should show the index of the item).
97
97
98
98
## More JavaScript :tada:
99
99
100
-
1. Create a function that takes 3 arguments and returns the sum of the three arguments.
100
+
1. Create a function that takes 3 arguments and returns the sum of the these arguments.
101
101
102
-
2. Create a function named `colorCar` that receives a color, and prints out, "a red car" for example.
102
+
2. Create a function named `colorCar` that receives a color, and prints out, *'a red car'* for example.
103
103
104
104
3. Create an object and a function that takes the object as a parameter and prints out all of its properties and values.
105
105
106
-
4. Create a function named `vehicleType` that receives a color, and a code, 1 for car, 2 for motorbike. And prints "a blue motorbike" for example when called as `vehicleType("blue", 2)`
106
+
4. Create a function named `vehicleType` that receives a color, and a code, 1 for car, 2 for motorbike. And prints *'a blue motorbike'* for example when called as `vehicleType("blue", 2)`
107
107
108
108
5. Can you write the following without the `if` statement, but with just as a single line with `console.log(...);`?
109
109
@@ -115,7 +115,7 @@ let favoriteAnimals = ['blowfish', 'capricorn', 'giraffe'];
115
115
}
116
116
```
117
117
118
-
6. Create a function called `vehicle`, like before, but takes another parameter called age, so that `vehicle("blue", 1, 5)` prints "a blue used car"
118
+
6. Create a function called `vehicle`, like before, but takes another parameter called `age`, so that `vehicle("blue", 1, 5)` prints *'a blue used car'*
119
119
120
120
7. Make a list of vehicles, you can add `"motorbike"`, `"caravan"`, `"bike"`, or more.
0 commit comments