Turn the rain-routing loop from the demo into a score report for an after-school workshop. A score of 60 or more passes; a score of 90 or more also earns honors. Visit every score and count both categories before returning one summary string. Work only in script.js; Run shows your checkpoints in the Console.
A separate loop over library returns shows the same visit-and-decide rhythm without giving away the score report:
const daysLate = [0, 3, 1];
let overdue = 0;
for (const days of daysLate) {
if (days > 0) overdue += 1;
}
console.log(`Overdue books: ${overdue}`); // Overdue books: 2
summarizeScores(scores) to count scores at least 60 as passed and at least 90 as honors, returning Passed: N | Honors: N. The provided single-score probe should print Single score: Passed: 1 | Honors: 0.Workshop: Passed: 3 | Honors: 1 from [38,74,91,60].Empty batch: Passed: 0 | Honors: 0 from [].Boundaries: Passed: 2 | Honors: 1 from [59,60,90] (thresholds are inclusive).You have finished Decision Desk: a loop handles each entry and a branch decides what it contributes. Try the control-flow quiz, then reuse these decisions inside functions.
Read each expected Console line, then build it from your function calls.