Explanation: Adding Methods to the Library Class1:20 with Ashley Boucher
Now that we have some basic objects to play with, let's flesh them out by adding some methods. We'll start with methods to add books and patrons to the Library objects.
Instructions for Workspace
Your instructions are as follows:
1) In the Library.js file, add two methods to the Library class:
addPatron()receives one argument, a Patron object. This object (stored in the
patronvariable) should be added to the Library object's (stored in the
patronsproperty, which is an array.
addBook()receives one argument, a Book object. This object (stored in the
bookvariable) should be added to the Library object's
booksproperty, which is an array.
You need to sign up for Treehouse in order to download course files.Sign up