Welcome to Timers and Files. Real apps run code later and share data as files, and in this course, you teach your page both.
In the video, you saw Sam’s recipe box, ready for the kitchen. Until now, Sam watched the clock, and the recipes were stuck in one browser. Your finished box keeps time on its cooking steps and moves recipes in and out as files:
| What Sam does | What Sam’s finished box shows |
|---|---|
| Opens the box for the first time | The four starter recipes, which came with the app as a data file, each with its steps |
| Starts Simmer, then Boil the eggs | Both lines counting down at once, such as Simmer: 24:54 left and Boil the eggs: 5:55 left |
| Picks a friend’s plain recipe list from the computer | The three new recipes, and 3 recipes imported from ayumi.csv. Saved. |
| Clicks Export a backup | A new file, recipe-box-backup.json, in the browser’s downloads |
By the end of this course, you’ll know how to:
- Run code later without freezing the page, and write functions that remember their own variables
- Schedule, repeat, and cancel timers, and count down from a deadline on the page
- Split text into fields, and fetch JSON and CSV files from the page’s server
- Read a file the user picks, check it, and save a new file for them to keep
- Load data files the app ships with, let users export and import their data, and add timers and timed feedback to a page
Before You Start
You need the JavaScript basics, including objects and arrays of objects, and you should know how a page saves its data in the browser and redraws a list. Sam’s recipe box is that kind of page, and it’s where this course starts. The box as this course starts is in the course’s Sample Code download, folder 01-why-async/recipes-start, ready to open. Each exercise gives you starting code. You also need:
- A current version of Chrome or Edge
- A code editor
- A local server, such as Live Preview in your editor
How This Course Works
The course has four sections: Code That Runs Later, Timers on the Page, Loading Data Files, and Files the User Picks. Each section mixes text lessons and videos, and ends with an exercise you solve in the browser, with automated tests that check your code.
In the project, A Kitchen-Ready Recipe Box, you finish Sam’s box in three exercises, then explain it in a chat with the AI mentor. A quiz and a summary close the course.
If your code waits for Sam’s eggs, what happens to the page? First up is Run Code Later Without Freezing, where you find out.