Kết quả đoạn code javascript sau là gì và giải thích tại sao?
Kết quả đoạn code javascript sau là gì và giải thích tại sao?
function compareMembers(person1, person2 = person) {
if (person1 !== person2) {
console.log("Not the same!");
} else {
console.log("They are the same!");
}
}
const person = { name: "Lydia" };
compareMembers(person);
Not the same!They are the same!ReferenceErrorSyntaxErrorĐăng nhập để tham gia thảo luận cùng mọi người.
Chưa có bình luận nào
Hãy là người đầu tiên chia sẻ suy nghĩ của bạn.