File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -25,9 +25,15 @@ for (i=0; i < foods.length; i++) {
25
25
// #5: Create an object literal called `instructor` that contains three key-value pairs.
26
26
// Type your solution immediately below this line:
27
27
28
-
28
+ instructor = {
29
+ name : "Caio" ,
30
+ age : 25 ,
31
+ favFood : "pizza"
32
+ }
29
33
30
34
// #6: Add a `has-office-hours` (spelled exactly) property to `instructor` by accessing
31
35
// it (do not change the original object you typed above) and assigning it
32
36
// a boolean value.
33
37
// Type your solution immediately below this line:
38
+
39
+ instructor [ 'has-office-hours' ] = false
Original file line number Diff line number Diff line change 7
7
// Type your solution immediately below this line:
8
8
9
9
10
-
10
+ class Playlist {
11
+ constructor ( title ) {
12
+ this . title = title
13
+ this . songs = [ ]
14
+ }
15
+ addSong ( song ) {
16
+ this . songs . push ( song )
17
+ }
18
+ }
11
19
12
20
13
21
// #2: Create an instance of the Playlist class and set it to a variable called `myPlaylist`
16
24
17
25
18
26
19
-
20
-
21
27
// NOTE: THE CODE BELOW IS FOR TESTING PURPOSES. DO NOT REMOVE OR ALTER.
22
28
if ( typeof Playlist !== 'undefined' ) {
23
29
module . exports = {
You can’t perform that action at this time.
0 commit comments