How do you define a function with a variable number of parameters in JavaScript?
By using the variable keyword after the parameter names.
variable
By enclosing the parameter names in curly braces {}.
By using the varargs keyword before the parameter names.
varargs
By using the ... spread syntax before the parameter name.
...