Skip to content

Commit 86610be

Browse files
committed
1 parent bc7b338 commit 86610be

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

oojs.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,15 @@
55
// - a `songs` property that is an empty array not determined by input (not passed into the constructor)
66
// - an `addSong` method that adds a song (string) to the `songs` array
77
// Type your solution immediately below this line:
8-
9-
8+
class Playlist{
9+
constructor(title){
10+
this.title=title;
11+
}
12+
songs = [];
13+
addSong(song){
14+
songs.push(song);
15+
}
16+
}
1017

1118

1219

0 commit comments

Comments
 (0)