function checkObj(obj, checkProp) {
// Only change code below this line
var obj = {
gift:“pony”,
pet:“kitten”,
bed:“sleight”,
city:“Seattle”,
};
if (obj.hasOwnProperty(checkProp)) {
return obj[checkProp];
}else{return “Not Found”;}
// Only change code above this line
}
i know few lession before fcc explained how to remove from var, but if i do so i dont pass the gift return pony, while now i cant have result gift not found
im confused
can someone help me out pls?
i think i would need 3 var obj… dont remember for such thing, but ofc could just forgot about…
or i just can if else?
thank you, got it… today aint my brightest day till now but ill try to work on to change it
but somehow im still confused
i dont get the part how return for gift not found and pony same time only by change obj to checkObj
i still have a feeling i would need 3 checkObj or with if else or something to complete last task, but somehow i dont