Tell us what’s happening:
The test s include testing for “gift”. It expects two different answers; “pony” and “Not Found”. I can’t seem to figure out how to pass these tests, simultaneously. Please help!!!
**Your code so far**
function checkObj(obj, checkProp) {
// Only change code below this line
var obj = {
gift: 'pony',
pet: 'kitten',
bed: 'sleigh',
city: 'Seattle',
};
if(obj.hasOwnProperty(checkProp)){
return obj[checkProp];
}
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/90.0.4430.93 Safari/537.36.
the function is being tested with different objects, and instead of using the different objects passed in you are using always the same one. Why are you overwriting the function parameter?