Explain Your Recipe Box

Sam’s recipe box is ready for the kitchen. Over the last three exercises, you loaded the starters from their file, exported and imported a backup, added Ayumi’s list, and gave every timed step its own countdown. The tests checked what the page did. They couldn’t check whether you can say why it works, and that’s what you’ll need on the day Sam asks for something new.

In this conversation with the AI mentor, you’ll explain two parts of your box in your own words: how each timer remembers its own step and why the import checks a file before it trusts it. Then you’ll make a change to the box that you haven’t seen yet. Start by getting your code ready.

Get Your Box Ready

The mentor asks to see your code and has you try the change on the page, so get both ready before you begin. Open your finished main.js in your editor, and serve the box as before, at http://127.0.0.1:3000/recipes/index.html. Keep the Console open beside it, since errors caused by a change usually appear there first.

If you built the project only in the exercise editors, open two solutions instead: Exercise: Add Cooking Timers for the timer questions, and Exercise: Load, Export and Import Recipes for the question about importing a backup. Let the mentor know that you worked in the exercise editors. You’ll still explain the same code, and the mentor gives you a change you can try there.

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.