Tell us what’s happening:
I don’t know what I’ve done wrong, why won’t my code work?
**Your code so far**
function checkObj(obj, checkProp) {
// Only change code below this line
check (obj.hasOwnProperty(checkProp));
gift: "pony";
pet: "kitten";
bed: "sleigh";
city: "Seattle";
if (obj.hasOwnProperty)
return (checkProp);
else {
return "Not Found";
}
}
// Only change code above this line
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36
There are significant syntactical errors in your code. Reading it, I’m not totally sure what it’s supported to be doing. Right from the first like there’s a call of an undeclared function (check (obj.hasOwnProperty(checkProp));) and then on the next line there are a series of assertions that look like they are defining an object’s properties, but not quite.
I suggest going back a few lessons and paying extra close attention to the syntax of the examples.