javascript试题-下面的代码会输出什么?

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);

网友评论0