Can a JavaScript function take unlimited arguments? Something like this:
testArray(1, 2, 3, 4, 5...);
I am trying:
var arr = [];
function testArray(A) {
arr.push(A);
}
But this doesn't work (output is only the first argument). Or the only way is:
function testArray(a, b, c, d, e...) {
}
Thanks