下面代码的输出是: function func() {...
发布于 2022-03-02 16:49:57
下面代码的输出是:
function func() { this.name = "Hellen" } console.log(typeof func.prototype) func.prototype.getName = function() { console.log(this.name) } const Obj = {} Obj.__proto__ = func.prototype func.call(Obj) if (Obj.getName) { console.log("yes") Obj.getName() } console.log("end")
登录后免费查看答案
关注者
0
被浏览
29