My problem is best illustrated by the small code sample 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 acalled with a variable number of arguments, and I would like to call bwith these arguments. Unfortunately, when I run the code above, it displays 3 and 1, respectively, and not 3 and 3.
How can I call bwith all arguments received in a?
source
share