下面代码的输出是什么?() functionPerson(firstName,lastName){ this.firstName=firstName; this.lastName=lastName; } constlydia=newPerson("Lydia","Hallie"); constsarah=Person("Sarah","Smith"); console.log(lydia); console.log(sarah); A: Person{firstName:"Lydia",lastName:"Hallie"}andundefined B: Person{firstName:"Lydia",lastName:"Hallie"}andPerson{firstName:"Sarah",lastName:"Smith"} C: Person{firstName:"Lydia",lastName:"Hallie"}and{} D: Person{firstName:"Lydia",lastName:"Hallie"}andReferenceError
下面代码的输出是什么?() functionPerson(firstName,lastName){ this.firstName=firstName; this.lastName=lastName; } constlydia=newPerson("Lydia","Hallie"); constsarah=Person("Sarah","Smith"); console.log(lydia); console.log(sarah); A: Person{firstName:"Lydia",lastName:"Hallie"}andundefined B: Person{firstName:"Lydia",lastName:"Hallie"}andPerson{firstName:"Sarah",lastName:"Smith"} C: Person{firstName:"Lydia",lastName:"Hallie"}and{} D: Person{firstName:"Lydia",lastName:"Hallie"}andReferenceError
1