function checkObj(obj, checkProp) {
// Only change code below this line
if(obj.hasOwnProperty(checkProp) == true){
return obj[checkProp]
}else{
return "Not found";
}
// Only change code above this line
}
console.log(checkObj({gift: "pony", pet: "kitten", bed: "sleigh"}, "gift"));
console.log(checkObj({gift: "pony", pet: "kitten", bed: "sleigh"}, "house"));
Even though my code is right,Freecodecamp does not except my solution.I will be deeply appreciated if anyone give me a hit/suggestion.
I also attached my screenshot of my work.