0 of 8 problems solved • 0%
Use in a course

Exercise prompt

Use Rest Parameters

A rest parameter collects any remaining function arguments into an array. A function can then loop through however many values it receives.

Example

function listNames(...names) { console.log(names); } listNames("Mira", "Leo");

Your task

Repair the parameter of totalScores so its loop receives all four score arguments instead of only the final three. Keep the function call and console statement, and make the output Total: 18.