Skip to main content

Practice ยท 3 of 3

Rest-Parameter Statistics

CHALLENGE
Difficulty: intermediate+25 XP

Write stats(...numbers) that accepts any number of numeric arguments and RETURNS { min, max, avg }. Called with no arguments it RETURNS { min: 0, max: 0, avg: 0 } instead of throwing.

Back to lesson: Practice: Destructuring & Spread โ€” Practice