β
You can use a similar three-dot notation to call a function with an array of arguments. let numbers = [5, 1, 7]; console.log( max(... numbers)); // β 7 This βspreadsβ out the array into the function call, passing its elements as separate arguments. It is possible to include an array like that along with other arguments, as in max( 9, ... numbers, 2).
β
β