I also tried this

Tell us what’s happening:

I tried other ways too and everything else, it doesn’t give me even one thick. Is there anything I’ve been missing?

Your code so far




var myObj = {
   gift: "pony",
   pet: "kitten",
   bed: "sleigh",
   city: "Seattle"
 };

 // Only change code bellow this line
function checkObj(obj, checkprop){
result = "";
if (myobj.hasOwnProperty(checkprop)){
 return myobj.checkProp;
}
else{
 return "Not Found";
}
}

 // 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/83.0.4103.97 Safari/537.36.

Challenge: Testing Objects for Properties

Link to the challenge:

A post was merged into an existing topic: It seems the practices are getting complicated

Please do not create duplicate topics for the same challenge/project question(s). This duplicate topic has been unlisted.

Thank you.