1function myFunction(a, b, c) {//number of parameters should match number of items in your array
2 //simple use example
3 console.log("a: " + a);
4 console.log("b: " + b);
5 console.log("c: " + c);
6}
7
8var myArray = [1, -3, "Hello"];//define your array
9myFunction.apply(this, myArray);//call function
1const args = ['test0','test1','test2'];
2function call_me(param1, param2, param3){
3 //
4}
5call_me.apply(this, args);
1var x = [ 'p0', 'p1', 'p2' ];
2call_me(x);
3
4function call_me(params) {
5 for (i=0; i<params.length; i++) {
6 alert(params[i])
7 }
8}