Explain Your Laundry Room

Your laundry room program at 14 Ferris Road now passes all three exercises. The machines tell the right housemate when a load is done, the nag stops once the laundry is collected, and the sock job no longer holds up the reminders. Passing tests show that the program works. They can’t show that you know why it works, and that’s what you’ll need when you write the next program that waits.

In this session, you’ll explain your code to your AI mentor in your own words. Then you’ll make a change to it that you haven’t seen before. Start by getting your code where you can see it.

Get Your Program Ready

The mentor asks about the code you wrote, so have it open before you start. Copy your passing code from Exercise: Notify and Nag Housemates, Exercise: Sort the Lost Socks Mid-Cycle, and Exercise: Read the Cycle Log into your editor, or open the exercises in another tab. You’ll paste parts of it into the chat when the mentor asks.

You’ll also want a terminal with your laundry folder open. The change at the end is small. If you can run your code with node, then you can check your prediction against a real run. If you can’t, then tracing it through by hand is fine too.

Locked learning resources

Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Already a member? Sign-In

Locked learning resources

The full lesson is for members only. Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Already a member? Sign-In

Become a Member to join the conversation.