One dataset, four methods: keep some rows, transform them, fold to a total, then draw the list. No new APIs beyond this phase.

kept → labels → total

Rendered with forEach

Summary appears here.

Set filters, then run the pipeline.

Important JavaScript

const kept = players.filter((player) => {
  return player.score >= minScore &&
    (category === "any" || player.category === category);
});

const labels = kept.map((player) => player.name + ": " + player.score);

const total = kept.reduce((acc, player) => acc + player.score, 0);

labels.forEach(function (line) {
  const li = document.createElement("li");
  li.textContent = line;
  list.appendChild(li);
});