I have a function in JavaScript:
function test() {
console.log(arguments.length);
}
if I call it test(1,3,5), it outputs 3, because there are 3 arguments. How can I call a test from another function and pass other arguments to the function?
function other() {
test(arguments);
test();
}
I want to call otherand call it testwith an array arguments.
source
share