Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
Here an explanation for how we'll build the constructor methods for the three classes used in our library application.
Instructions for Workspace
Your instructions are as follows:
1) In the Library.js file, add a constructor method to the Library class. In the constructor method, initialize the following properties: books
, patrons
.
2) In the Book.js file, add a constructor method to the Book class. In the constructor method, initialize the following properties: title
, author
, isbn
.
3) In the Patron.js file, add a constructor method to the Patron class. In the constructor method, initialize the following properties: name
, email
, currentBook
.
Don't forget to add parameters for any values that need to be passed in to each of the constructor methods.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up