Tell us what’s happening:
Describe your issue in detail here.
Hi lovely comunity,
I am not understanding this one. I tried based on some forum replies but I still do not seem to be able to pass this test. Can someone explain me how to solve and also explain why it is so?
I am feeling a little lost now.
Thank you in advance.
Your code so far
function checkObj(obj, checkProp) {
// Only change code below this line
if (obj[checkObj]){
return obj[checkObj];
}
else {
return "Not Found";
}
// Only change code above this line
} console.log(checkObj({gift: "pony", pet: "kitten", bed: "sleigh"})
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36
Challenge: Basic JavaScript - Testing Objects for Properties
Link to the challenge: