A rest parameter gathers remaining arguments into an array.
function listNames(...names) {
console.log(names);
}
listNames("Mira", "Leo");
// Output:
// ["Mira", "Leo"]...names collects "Mira" and "Leo" into ["Mira", "Leo"].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.