Library (The Odin Project)
Requirements
- All of your book objects are going to be stored in an array. Then, add a separate function to the script (not inside the constructor) that can take some arguments, create a book from those arguments, and store the new book object into an array.
- Write a function that loops through the array and displays each book on the page. You can display them in some sort of table, or each on their own “card”.
- Add a “New Book” button that brings up a form allowing users to input the details for the new book and add it to the library: author, title, number of pages, whether it’s been read and anything else you might want.
- Add a button on each book’s display to remove the book from the library.
- Add a button on each book’s display to change its read status.