Codex course

Module 5 of 14

Mark a Task as Finished

Time: about 10 minutes

Difficulty: Beginner

No programming experience needed.

What you'll learn

  • How to mark and unmark a finished task.

Step-by-step instructions

  1. Type this message and press Return:
Codex message

Please add one small feature to my task list: put an empty tick box beside every task. Do not change what happens when I click the tick box yet. Tell me exactly how to check this in my browser.

  1. Refresh the page.

How to check it worked: Each task has an empty square beside it.

  1. Type this message and press Return:
Codex message

Now make each tick box work. When I click a tick box, mark that task as finished by showing a tick in the box and drawing a line through the task words. When I click it again, return the task to normal. Do not add any other features. Tell me exactly how to test this.

  1. Click the tick box beside Buy groceries, then click it again.

How to check it worked: The task first gains a tick and a line through it, then returns to normal.

If something doesn't work

Codex message

I can see the tick box, but clicking it does not mark the task as finished. Please fix just that one problem.

What just happened?

Codex added a small yes-or-no choice to every task. The app now keeps track of whether each task is unfinished or finished and changes the task's appearance to match.

This is another example of behaviour: clicking one control changes only the task beside it.

Module checklist

  • Every task has a tick box.
  • Clicking it marks and unmarks the task.

Next module: You will remove tasks you no longer need.