js语言和框架-ES和TS-箭头函数和this
箭头函数中this指向举例
var a=11;function test2(){this.a=22;let b=()=>{console.log(this.a)}b();}var x=new test2();//输出22定义时绑定。
加载更多