欢迎来到财会考试题库网 财会考试题库官网
logo
全部科目 > 大学试题 > 计算机科学 > 计算机程序设计 > 计算机程序设计综合练习

单项选择题

下面代码的输出是什么?()
function Person(firstName, lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
const lydia = new Person("Lydia", "Hallie");
const sarah = Person("Sarah", "Smith");
console.log(lydia);
console.log(sarah);

    A.Person{firstName:"Lydia",lastName:"Hallie"} and undefined
    B.Person {firstName: "Lydia", lastName: "Hallie"} and Person {firstName: "Sarah", lastName: "Smith"}
    C.Person {firstName: "Lydia", lastName: "Hallie"} and {}
    D.Person{firstName:"Lydia",lastName:"Hallie"}and ReferenceError

点击查看答案

相关考题

微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题