Catalog of Library books

I’ve completed the Library project in the Web development path.

The challenge is to create a catalog of all the Media.
’ Create class called Catalog that holds all of the Media items in our library.’

So I assume I am pushing all instances of a class Media to a list.

But how do I do that?

I added an array called catalog in the custructor of the Media class.
Is that a good place to start?

Please help

1 Like

Declare a data structure to hold your media outside of the class.
Think of your array as a literal bookshelf that you will put the media object “into”

var bookShelf1 = [book1, book2, book3];
var videoShelf1 = [video1, video2, video3];
var library = [bookShelf1, videoShelf1];

1 Like