01 / 05
Sometimes the number of arguments is not settled
When you make a function that produces a total, how many numbers you add is not necessarily settled in advance.
Write function total(a, b, c) and it becomes a three-only affair. Call it with two and the missing one becomes undefined; call it with four and the fourth gets ignored.
function total(a, b, c) { return a + b + c;}console.log(total(1, 2));Result
NaN