Tell us what’s happening:
Describe your issue in detail here.
**Your code so far**
function checkObj(obj, checkProp) {
// Only change code below this line
var myObj = {
gift: 'pony',
pet: "kitten",
bed: 'sleigh',
city: "Seattle"
};
if (myObj.hasOwnProperty(checkProp)) {
return myObj[checkProp];
} else {
return 'Not Found';
}
// Only change code above this lin
}
checkObj("gift");
**Your browser information:**
User Agent is: Mozilla/5.0 (Linux; Android 10; Nokia 3.1 Plus) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.210 Mobile Safari/537.36.
Why is var myObj in your function?
What’s the value of obj and checkProp inside the function checkObj? (use console.log() )
What do you pass to the function with checkObj("gift") ?
It looks like you don’t really understand the use of functions, so I would recommend to read more about them.