Câu hỏi phỏng vấn Javascript
Câu hỏi

Kết quả đoạn code javascript sau là gì và giải thích tại sao?

Câu trả lời

javascript Copy
  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);
  • A: Not the same!
  • B: They are the same!
  • C: ReferenceError
  • D: SyntaxError

Đáp án: B

Objec...

middle

middle

Gợi ý câu hỏi phỏng vấn

middle

Kết quả đoạn code sau là gì? Và giải thích?

junior

Kết quả đoạn code javascript sau là true hay false? Hãy giải thích tại sao?

middle

Ouput đoạn code javascript sau là gì và hãy giải thích tại sao?

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào