class Book {
constructor(title, author, numPages, publishDate, hasRead, currentPage) {
this.title = title;
this.author = author;
this.numPages = numPages;
this.publishDate = publishDate;
this.hasRead = hasRead;
this.currentPage = currentPage;
}
toggleHasRead(readStatus) {
this.hasRead = readStatus;
}
setCurrentPage(page) {
this.currentPage = page;
}
}
export default Book;
-
vchalamalsetty authored2649f488