My issue is best illustrated with a small code example available on JsFiddle:
function a() {
alert("a: " + arguments.length);
b(arguments);
}
function b() {
alert("b: " + arguments.length);
}
a(33,445,67);
I have a function a called with a variable number of arguments, and I would like to call b with these arguments. Unfortunately, when I run the code above, it displays respectively 3 and 1, rather than 3 and 3.
How can I call b with all the arguments received in a?