window.name = 'ByteDance'; function A () { this.name = 123; } A.prototype.getA = function(){ console.log(this); return this.name + 1; } let a = new A(); let funcA = a.getA; funcA(); 这个输出好像是ByteDance1
2 6

相关推荐

点赞 评论 收藏
转发
牛客网
牛客企业服务