var obj = { a: 1, b: 2, fn: function(){ // 补全代码 return this.a+this.b } }
当函数作为对象的方法被调用时,this指向该对象
this指向该对象