A pattern in some javascript libraries is to be able to pass any number of parameters to a function:
functiona(param1)
functiona(param1, param2, param3)
functiona(param1, param2)
I have an array of unknown length, and I'd like to pass all the array items as parameters to a function like functiona()
. Is this possible? If so, what is the syntax for doing this?