Book.js 467 Bytes
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;