关于前端:选择篇021下面代码的输出是什么

29次阅读

共计 293 个字符,预计需要花费 1 分钟才能阅读完成。

function Person(firstName, lastName) {
  this.firstName = firstName;
  this.lastName = lastName;
}

const member = new Person("Lydia", "Hallie");
Person.getFullName = function () {return `${this.firstName} ${this.lastName}`;
}

console.log(member.getFullName());

A: TypeError
B: SyntaxError
C: Lydia Hallie
D: undefined undefined

参考答案:

正文完
 0