Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.
- Explanation: Adding Methods to the Library Class 1:20
- Solution: Adding Methods to the Library Class
- Demo: Add Patrons and Books to the Library Class 1:58
- Explanation: Checking Out and Returning Books 1:24
- Recap: Updating our Plan of Attack
- Solution: Adding New Properties to the Book Class
- Starting with Some Methods 4 questions
Instruction
Solution: Adding New Properties to the Book Class
Solution for Adding New Properties to the Book Class
The updated constructor method for the Book class should look like this:
class Book {
constructor(title, author, isbn) {
this.title = title;
this.author = author;
this.isbn = isbn;
this.patron = null;
this.dueDate = null;
this.out = false;
}
}
The patron and dueDate properties are se...