// Setup
var myObj = {
gift: "pony",
pet: "kitten",
bed: "sleigh"
};
function checkObj(obj, checkProp) {
// Only change code below this line
if(myObj.hasOwnProperty(obj) == checkProp){
return myObj.hasOwnProperty()}
}
// Only change code above this line
}
checkObj(myObj, "gift");
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36.
It will most likely not pass. Only solute the unexpected token
if(myObj.hasOwnProperty(obj) == checkProp){
You are checking if hasOwnProperty has property obj
but are then comparing it to checkProp is that what you want?
return that property's value.
return myObj.hasOwnProperty()}
If not, return "Not Found".