Build library - Step 25 Create class called Catalog that holds all of the Media items in our library

hi all,
has anyone done this step ?

1 Like

I think I’ve done this in a previous exercise/project! Can I help you with something?

1 Like

hey thanks for the getting in touch
i have just started having ago at it ,atm am am a bit stuck in trying to create a remove method in the catalog object
here is my code:

// Catalog object that holds all of the Media items in library

let catalog = {

  _books: [],

  _movies:[],

  _cds:[],

  get books(){

      return this._books;

  },

  get Movies(){

      return this._movies;

  },

  get cds(){

      return this._cds;

  },

  addBook(book){

    this._books.push(book)

  },

  addMovies(movie){

    this._movies.push(movie)

  },

  addCds(cd){

      this._cds.push(cd)

  },

 remove(){

   

 }

}

catalog.addBook(book1)

catalog.addMovies(movie1)

catalog.addCds(cd1)

catalog.addCds(cd1)

catalog.addCds(cd1)

console.log(catalog.books)

console.log(catalog.Movies)

console.log(catalog.cds)

There is no I in ‘team’, or, ‘we’.