I have the following problem where I have function with parameters and I have an array of the values associated with the parameters.
var myFunction = function(argument_0, argument_1 ) {
//do stuff
}
var arguments = new Array();
arguments[0] = "value0";
arguments[1] = "value1";
How would I go about passing that array in the same format to the function?
Dairo
8161 gold badge9 silver badges24 bronze badges
asked Jan 21, 2014 at 20:34
Barry Hamilton
9834 gold badges16 silver badges35 bronze badges
-
possible duplicate of How to create a function and pass in variable length argument list?Felix Kling– Felix Kling2014年01月21日 20:40:54 +00:00Commented Jan 21, 2014 at 20:40
lang-js