168
rated 0 times
[
169]
[
1]
/ answers: 1 / hits: 20401
/ 13 Years ago, fri, september 9, 2011, 12:00:00
I want to create a function in javascript with a variable amount of arguments. The next example is how I want to call this function:
myFunction(1,2);
myFunction(1,2,3);
myFunction(1,2,3,4);
myFunction(1,2,3,4,5);
myFunction(1,2,3,4,5,6);
Anyone knows how to define this function?
More From » variadic-functions