Tell us what’s happening:
I can not spot the error here
Pls help
Your code so far
var myObj = {
gift:"pony",
pet:"kitten",
bed:"sleigh"
};
function checkObj(checkProp) {
if(myObj.hasOwnProperty(checkProp)){
return myObj[checkProp];
}else{
return "Not Found"
}
// Only change code below this line
// return "Change Me!";
// Only change code above this line
}
Your browser information:
User Agent is: Mozilla/5.0 (Linux; Android 8.1.0; Infinix X5515 Build/O11019) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Mobile Safari/537.36
.
Challenge: Testing Objects for Properties
Link to the challenge: