题解 | #this指向#
this指向
http://www.nowcoder.com/practice/0b0770a09d9d49aeb4f3d5d4dd7f34f5
{"css":"","js":"var obj = {\n a: 1,\n b: 2,\n fn: function(){\n // 补全代码\n return this.a + this.b;\n }\n}","html":"","libs":[]}
因为题目对象里面的函数是function而不是箭头函数, 所以里面this的指向就是该对象