箭头函数中的this

(1)

 

(2)

 

 

 

 最后输出为: 1

 

  生成foo实例的时候,print已经创建完成,这时候this指向Foo的实例--- foo

 

(3)

 

 

 

posted @ 2022-03-16 22:00  方头小小狮  阅读(20)  评论(0)    收藏  举报