** checkObj({pet: "kitten", bed: "sleigh"}, "gift")
should return the string Not Found
.**
It looks like it’s asking me to make return gift: “pony” on one task but on the other it asks me to return gift - “Not Found”
so the answers changes either wrong on the first task or on the last one
Your code so far
function checkObj(obj, checkProp) {
// Only change code below this line
var checkObj = {
gift: "pony",
pet: "kitten",
bed: "sleigh",
city: "Seattle"
} ;
var answer = "";
if (checkObj.hasOwnProperty(checkProp)) {
return checkObj[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.0 Safari/605.1.15
Challenge: Basic JavaScript - Testing Objects for Properties
Link to the challenge: