Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
samishken committed Feb 12, 2018
1 parent c045d6a commit 3eb8f30
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion hof.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var people = [
// person in the `people` array. Assign the returned array to a variable
// called `peopleNames`.
// Type your solution immediately below this line:

var peopleNames = people.map(person => (person.name))


// #2: Use the `filter` array method to create a new, filtered array containing only
Expand Down
13 changes: 9 additions & 4 deletions oojs.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@
// - a `songs` property that is an empty array not determined by input (not passed into the constructor)
// - an `addSong` method that adds a song (string) to the `songs` array
// Type your solution immediately below this line:




class Playlist {
constructor (title){
this.title = title
this.songs = []
}
}
addSong(newSong){
this.songs.push(newSong)
}

// #2: Create an instance of the Playlist class and set it to a variable called `myPlaylist`
// Call the instance's `addSong` method to add a song to the instance's `songs` array
Expand Down

0 comments on commit 3eb8f30

Please sign in to comment.