The*_*ter 3 javascript ecmascript-6 arrow-functions
我有一个箭头功能,我试图执行call().为简化起见,如下:
按预期运作
const func = (e) => {
    console.log(e)
}
func.call(null, e)
嗯......这里发生了什么?
我希望下面的代码传递element到func作为this.
const func = (e) => {
    console.log(this)
    console.log(e)
}
func.call(element, e)
但是,相反this仍然存在undefined.
如果我将它切换到常规函数定义,则所有都按预期工作.
const func = function (e) {
    console.log(this)
    console.log(e)
}
func.call(element, e)
题
为什么我无法将上下文传递给this箭头函数call()?