Hello! I got stuck with testing objects code, pls need some help here.
It does not return the string Not Found .
Your code so far
function checkObj(obj, checkProp) {
// Only change code below this line
if ({gift: “pony”, pet: “kitten”, bed: “sleigh”}) {
return obj[checkProp];
}
else {
return “Not Found”;
}
// Only change code above this line
}
function checkObj(obj, checkProp) {
// Only change code below this line
if ({gift: "pony", pet: "kitten", bed: "sleigh"}) {
return obj[checkProp];
}
else {
return "Not Found";
}
// Only change code above this line
}
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Safari/605.1.15