What is the purpose of the rest parameter in JavaScript functions?
It represents the last parameter of a function.
It allows you to pass an indefinite number of arguments to a function.
It allows you to define optional parameters in a function.
It allows you to access the remaining elements of an array.