1 00:00:00,400 --> 00:00:02,200 Now that you've refactored the checkout and 2 00:00:02,200 --> 00:00:05,930 return book methods, lets head back to Workspaces to demo them. 3 00:00:05,930 --> 00:00:09,624 If you need it, I've attached a new Workspace to this video that includes 4 00:00:09,624 --> 00:00:10,888 the most up to date code. 5 00:00:10,888 --> 00:00:15,430 Once you've got your Workspace open, navigate to the index.html file. 6 00:00:15,430 --> 00:00:17,170 I'd like to see how our checkout and 7 00:00:17,170 --> 00:00:21,510 return book methods are working with the addition of our out setter method. 8 00:00:21,510 --> 00:00:25,597 So first, let's log the patron object to refresh our memory about what's inside. 9 00:00:30,666 --> 00:00:35,210 Now let's save, preview, and use our dev tools to check out the console. 10 00:00:35,210 --> 00:00:39,520 Let's click this little arrow to dial down into the logged patron object. 11 00:00:39,520 --> 00:00:42,990 As you can see, the patron's name and email address are there and 12 00:00:42,990 --> 00:00:45,610 the current book property is set to null. 13 00:00:45,610 --> 00:00:48,860 Let's go back to work spaces and have this patron check out a book so 14 00:00:48,860 --> 00:00:51,250 this current book property is populated with something. 15 00:00:52,330 --> 00:00:55,188 I'm gonna call the checkout method on the patron object and 16 00:00:55,188 --> 00:00:57,141 pass in the book object we created here. 17 00:01:03,976 --> 00:01:07,804 After saving this and heading back to our console, we should be able to see 18 00:01:07,804 --> 00:01:11,280 the book object as the value for patron's current book property. 19 00:01:13,070 --> 00:01:14,970 Now, when we dial into our patron object, 20 00:01:14,970 --> 00:01:18,280 we can see the book object in the current book property. 21 00:01:18,280 --> 00:01:19,370 If we click on into it, 22 00:01:19,370 --> 00:01:23,458 we can also see that our set of method worked just as we wanted it to. 23 00:01:23,458 --> 00:01:26,370 The outback end property is set to true and 24 00:01:26,370 --> 00:01:28,932 even the due date property was populated. 25 00:01:28,932 --> 00:01:33,195 All right, now that we've checked the book out, let's return it to the library. 26 00:01:33,195 --> 00:01:34,580 Right below the checkout method call, 27 00:01:34,580 --> 00:01:37,210 we can call the return book method on the patron object. 28 00:01:39,090 --> 00:01:42,207 Let us keep this patron log after the returnBook method and 29 00:01:42,207 --> 00:01:44,630 also add a console.log for the book object. 30 00:01:49,572 --> 00:01:51,480 All right, now save and head back to the browser. 31 00:01:52,480 --> 00:01:56,460 As expected, the patron's currentBook property is back to null. 32 00:01:56,460 --> 00:02:00,610 And inside the Book object, the dueDate property is null, once again, and so 33 00:02:00,610 --> 00:02:02,160 is the patron property. 34 00:02:02,160 --> 00:02:05,300 The _out backend property is set back to false. 35 00:02:05,300 --> 00:02:07,120 Okay, great work on this, let's keep going.