I need to send parameters dynamically i.e.,(one time two parameters and another time 5 parameters like that). For Example Im having 4 arrays like., a1,a2,a3 and a4. if my condition is 2 then i need to send the any of the 2 arrays as a parameter(example : a1,a2 or a1,a3...). if my condition is 3 means i need to send 3 arrays as a parameter.
Example code:
var a1=[10,20,30,40];
var a2=[11,22,33,44];
var a3=[12,21,15,13];
var a4=[41,25,46,14];
Conditon : arrays==2 then
methodCall(a1,a3); or methodCall(a2,a3);
Please give me any suggestion for get the dynamic parameter.