Loading video player…

Reuse Your Report on New Data (Overview)

Your report works in the exercises. Now a new batch arrives with repeated messages, missing information, and labels nobody has reviewed yet. Can you reuse your code without letting those records quietly distort the numbers?

In this course, you’ll give your functions a home in a small project on your computer. The browser page and sample data are supplied; you edit one JavaScript file, save it, and reload the page. You’ll then add one rule at a time and check each result against records you can read yourself.

The completed report accounts for all nine records in the small test batch: five counted, one pending, and three excluded with reasons. Later, you’ll inspect those records by ID and explain every decision.

What You’ll Be Able to Do

  • Reuse your functions on a new batch: You move functions you’ve already written into a project folder. The rest is supplied, so you edit one file, report.js. Pick a new batch, and the same functions report on it: on Batch 2, they count three bugs, M-202, M-204 and M-206, without a change to report.js.
  • Apply three rules: Messages waiting for a label go on a pending list. Records missing information leave with a reason. An exact copy counts only once.
  • Explain the report: Say why each record was counted, pending, or left out.

Your Capstone

Your report function runs on a bigger, messier batch.

When a total looks wrong, you’ll test a small batch worked out by hand. When an AI assistant suggests a label, you’ll check that it fits the message.

What You Need

Next up: Keep Your Report Functions in a Local Project. That’s where your functions get a home.

The download includes the runnable starter project, a completed version, and the exercise source files:

Become a Member to join the conversation.