题库 软件开发 题目列表 下面代码的输出是: function func() { this.name...
单选题
下面代码的输出是:
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");

A.

function end

B.

function yes Hellen end

C.

object yes Hellen end

D.

Object end

题目信息
校招真题
-
正确率
0
评论
18
点击