can you pass name of array into function javascript code example
Example 1: javascript function with array parameter
const args = ['test0','test1','test2'];
function call_me(param1, param2, param3){
//
}
call_me.apply(this, args);
Example 2: make a parameter array in js
var x = [ 'p0', 'p1', 'p2' ];
call_me(x);
function call_me(params) {
for (i=0; i<params.length; i++) {
alert(params[i])
}
}