run test แล้ว output ตรงตาม hint แต่ไม่ผ่าน ผมคิดว่าตัวเองต้องผิดอะไรซักอย่าง ขอเงื่อนงำทีเพราะมีคนผ่านข้อนี้ไปแล้ว รบกวนดู code ผมก็ได้ครับ
var checkName = 0;
var i = 0;
while (i < contacts.length && checkName != 1) {
if (contacts[i].firstName == name) {
checkName = 1;
if (contacts[i].hasOwnProperty(prop)) {
console.log(contacts[i][prop]);
} else {
console.log(“No such property”);
}
}
i++;
}
if (checkName == 0) {
console.log(“No such contact”);
}