function checkObj(obj, checkProp) {
if(obj.hasOwnProperty(checkProp)){
return [checkProp];
}else{
return "Not found";
}
// Only change code below this line
// Only change code above this line
}
console.log(checkObj("gift"));
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36.
If “checkProp” were equal to “gift”, then as “gift” is a key found in this object, your code should return the value of that key, which in this case would be “pony”.
If “checkProp” were equal to “house”, it should return “Not Found”, because the object doesn’t contain that key.