📜  javascript 应用 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:28.993000             🧑  作者: Mango

代码示例2
function myFunc(p1, p2, pN)
{
     // here "this" equals myThis
}
let myThis = {};

// call myFunc using myThis as context.
// destructure array to function arguments.
myFunc.apply(myThis, ["param1", "param2", "paramN"]);