Fundamentals9 / 12
Up next

Default parameters

// exp falls back to 2 when the argument is omitted
const power = (base, exp = 2) => base ** exp;
console.log(power(5));
console.log(power(2, 10));
What you're solving

parameters can have fallbacks