JavaScript 函数有 4 种调用方式. 每种方式的不同方式在于 this 的初始化. this 关键字 一般而言,在Javascript中,this指向函数执行时的当前对象. 注意 this 是保留关键字,你不能修改 this 的值 作为一个函数调用 function myFunction(a, b) { return a * b; } myFunction(, ); // myFunction(10, 2) 返回 20 以上函数不属于任何对象.但是在 JavaScript 中它始终是默…