var c = { name: 'The c object', log: function() { this.name = 'Updated c object'; console.log(this); var setname = function(newname) { this.name = newname; console.log(this); } setname('Updated again! The c object'); console.log(this); }}c.log();第二个console.log为什么是指向window???
添加回答
举报
0/150
提交
取消