JavaScript применить
function myFunc(p1, p2, pN)
{
// here "this" will equal myThis
}
let myThis = {};
// call myFunc using myThis as context.
// destructure array to function arguments.
myFunc.apply(myThis, ["param1", "param2", "paramN"]);
TechNyquist