250 Câu hỏi trắc nghiệm Javascript, CSS, HTML có đáp án - Phần 2

Cho đoạn code sau. Kết quả là: let dog = { breed: 'Border Collie', sound: 'Wooh', getBreed: () => { return this.breed; }, getSound: function() { return this.sound; } }; console.log(dog.getBre

12/50

Cho đoạn code sau. Kết quả là:let dog = {
breed: 'Border Collie',
sound: 'Wooh',
getBreed: () => {
return this.breed;
},
getSound: function() {
return this.sound;
}
};
console.log(dog.getBreed(), dog.getSound());

Border Collie, Wooh

Border Collie, undefined

undefined, Wooh

undefined, undefined

Giải thích

Chọn đáp án C