Is it possible to send a variable number of arguments to a JavaScript function?
Is it possible to send a variable number of arguments to a JavaScript function, from an array? var arr = [‘a’,’b’,’c’] var func = function() { // debug alert(arguments.length); // for(arg in arguments) alert(arg); } func(‘a’,’b’,’c’,’d’); // prints 4 which is what I want, then ‘a’,’b’,’c’,’d’ func(arr); // prints 1, then ‘Array’ I’ve recently written … Read more