function myFunction(a, b, c) {//number of parameters should match number of items in your array
//simple use example
console.log("a: " + a);
console.log("b: " + b);
console.log("c: " + c);
}
var myArray = [1, -3, "Hello"];//define your array
myFunction.apply(this, myArray);//call function
function test([a, b])
{
console.log(a);
console.log(b);
}
function run()
{
test(["aaaaa", "bbbbbbb", "cccccc", "ddddddd", "eeeee"])
}
/*note that not every element was used in the function*/
function callMe(arr, name){
let newArr = [...arr];
alert(newArr);
}
const args = ['test0','test1','test2'];
function call_me(param1, param2, param3){
//
}
call_me.apply(this, args);
const fns = [(i)=>{console.log("first"+i)}, (i)=>{console.log("second"+i)}, (i)=>{console.log("third"+i)}]
fns[0]("XXXXX");