单选题

下面代码的输出是: 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
知识点
面圈网VIP题库

面圈网VIP题库全新上线,海量真题题库资源。 90大类考试,超10万份考试真题开放下载啦

去下载看看