-
Notifications
You must be signed in to change notification settings - Fork 23
/
fundamentals.js
31 lines (15 loc) · 967 Bytes
/
fundamentals.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// NOTE: Make sure to use the `var` keyword for ALL variable declarations.
// #1: Create an array of strings called `colors` that contains three colors.
// Type your solution immediately below this line:
// #2: Access the last item in the array and assign to a variable called `lastColor`.
// Type your solution immediately below this line:
// #3: Create an empty array called `favoriteColors`.
// Type your solution immediately below this line:
// #4: Create a `for` loop that adds each string in `colors` to `favoriteColors`.
// Type your solution immediately below this line:
// #5: Create an object literal called `student` that contains three key-value pairs.
// Type your solution immediately below this line:
// #6: Add a `attends-office-hours` (spelled exactly) property to `student` by accessing
// it (do not change the original object you typed above) and assigning it
// a boolean value.
// Type your solution immediately below this line: