Skip to content

Commit bce1397

Browse files
author
Brady Dawley
committed
OOJS.JS finished ga-wdi-exercises#1
1 parent bdb20e9 commit bce1397

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

oojs.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +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-
8+
class Playlist {
9+
constructor(title) {
10+
this.title = title;
11+
this.songs = [];
12+
}
13+
addsong (string) {
14+
return this.songs.push(string);
15+
}
16+
}
917

1018

1119

0 commit comments

Comments
 (0)