This project belongs to the JavaScript course from The Odin Project.
Books are stored as objects in an array. The page display is generated from that data rather than manipulated directly. The objective is keeping data and presentation as separate concerns.
- Book constructor: creates book objects with a title, author, page count, read status, and a unique id generated via
crypto.randomUUID(). - Add books: an
addBookToLibrary()function takes the book details, builds a Book from a constructor and pushes it into the library array. - Render the library: a
renderAll()function loops through the array and renders each book on the page. - New Book form: a button opens a form for entering title, author, pages, and read status.
- Remove books: each book has a delete button.
- Toggle read status: each book has a button wired to a Book prototype method that flips its read value.
- Metrics summary: there are metrics to show
total,readandpendingbooks.
No persistent storage. The library resets on page reload.
