pls help me i cant solve this nd do pls help me with what I did wrong
var obj = {
gift:"pony",
pet:"kitten",
bed:"sleigh"
};
function checkObj(checkProp) {
// Only change code below this line
if(obj.hasOwnProperty(checkProp) == 1)
{
return obj[checkProp];
}else
{
return "Change Me!";
}
// Only change code above this line
}checkObj("gift");
*
var obj = {
gift:"pony",
pet:"kitten",
bed:"sleigh"
};
function checkObj(checkProp) {
// Only change code below this line
if(obj.hasOwnProperty(checkProp) == 1)
{
return obj[checkProp];
}else
{
return "Change Me!";
}
// Only change code above this line
}checkObj("gift");
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.90 Safari/537.36
Challenge: Testing Objects for Properties
Link to the challenge: