Live Demo 👉 A Small JS Library App
Project Library was set as part of the The Odin Project curriculum, to practice Object constuctors from the previous lessons.
- None
- All of your book objects are going to be stored in a simple array, so add a function to the script (not the constructor) that can take user’s input and store the new bookcd objects 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: author, title, number of pages, whether it’s been read and anything else you might want
- You will most likely encounter an issue where submitting your form will not do what you expect it to do. That’s because the submit input tries to send the data to a server by default. If you’ve done the bonus section for the calculator assignment, you might be familiar with event.preventDefault();. Read up on the event.preventDefault documentation again and see how you can solve this issue!
- 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.
NOTE: You’re not required to add any type of storage right now. You will have the option to come back to this project later on in the course.
Rozla-Dev 27.03-2023