Tell us what’s happening:
I’m passing all of the tests except for :
checkObj({pet: "kitten", bed: "sleigh"}, "gift")
This is returning ‘pony’ in the console, what is my error here?
**Your code so far**
var myObj = {
gift: 'pony',
pet: 'kitten',
bed: 'sleigh',
city: 'Seattle'
};
function checkObj(obj, checkProp) {
if(myObj.hasOwnProperty(checkProp)) {
return myObj[checkProp];
} else {
return 'Not Found';
}
}
**Your browser information:**
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:86.0) Gecko/20100101 Firefox/86.0
.
Challenge: Testing Objects for Properties
Link to the challenge: