I’m really not getting why i don’t pass the lesson. Can you please help me understand what i’m doing wrong. Thank you so much
**Your code so far**
function checkObj(obj, checkProp) {
// Only change code below this line
var obj = {
gift: "pony",
pet: "kitten",
bed: "sleigh",
city: "Seattle"
};
var answer = "Not found";
if (obj.hasOwnProperty(checkProp)) {
answer = obj[checkProp];
}
return answer;
// Only change code above this line
}
console.log(checkObj("house"));
**Your browser information:**
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36
Challenge: Testing Objects for Properties
Link to the challenge: