MCPcopy Create free account
hub / github.com/LinkedInLearning/javascript-essential-training-2832077 / constructor

Method constructor

03_15/Book.js:2–18  ·  view source on GitHub ↗
(
    title,
    author,
    ISBN,
    pubYear,
    pageNumber,
    currentPage,
    readStatus
  )

Source from the content-addressed store, hash-verified

1class Book {
2 constructor(
3 title,
4 author,
5 ISBN,
6 pubYear,
7 pageNumber,
8 currentPage,
9 readStatus
10 ) {
11 this.title = title;
12 this.author = author;
13 this.ISBN = ISBN;
14 this.pubYear = pubYear;
15 this.pageNumber = pageNumber;
16 this.currentPage = currentPage;
17 this.readStatus = readStatus;
18 }
19 updateCurrentPage(newCurrentPage) {
20 this.currentPage = newCurrentPage;
21 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected