JS中this指向及修改(自用笔记) this指向: 1、全局中,this指向顶级对象,Window console.log(this); 2、构造函数中,this指向构造函数的实例化对象 function Fn(a){ this.a=a console.log(this); } let ft=new Fn(123) console.log(ft); 3、箭头函数this指向不会改变,是函数上一级的this指向