Help me on Testing Objects for Properties [SOLVED]

Help me on Testing Objects for Properties [SOLVED]
0.0 0

#1

Okay I’m pretty stuck on this and don’t really get it. I haven’t been practicing as much lately soon I’m busy with a lot of things so I might be a little rusty. Anyways here it is

// Setup
var myObj = {
  gift: "pony",
  pet: "kitten",
  bed: "sleigh"
};

function checkObj(checkProp) {
  // Your Code Here
  myObj.hasOwnProperty["gift"];
  myObj.hasOwnProperty["pet"];
    
  
  return "Not Found";
}

// Test your code by modifying these values
checkObj("gift");

#2

I think you need to read the challenge instructions again, because you are supposed to check if the argument checkProp is a property of myObj.

You are not using the hasOwnProperty function correctly. You do not use brackets [ ] You need parentheses ( ). Also, you should only return “Not Found” if the property does not exist in myObj. You are returning “Not Found” no matter what.