Testing Objects values(fcc)

This is not working ,any suggestions

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

function checkObj(checkProp) {
  // Your Code Here
  if(myObj.hasOwnProperty(checkProp) === true){
    return myObj.checkProp;
  }
  return "Not Found!";
}

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

Try reading this:

you have to put your string in brackets

eg.

return myObj.["gift"]

how can we use both bracket and dot notations

function checkObj(prop){
    return myObj[prop] 
}

This is working,thanks for the suggestions

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

function checkObj(checkProp) {
  // Your Code Here
 var val = "gift";
 var val1 = "pet";
 var val2 = "bed";
 if(checkProp == val){
   return myObj["gift"];
 }
 else if(checkProp == val1){
   return myObj["pet"]
 }
 else if(checkProp == val2){
   return myObj["bed"];
 }
  return "Not Found";
}

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

You have a lot of unnecessary code, if you use hasOwnProperty() it will be much shorter and much more reusable - what if the object get new properties?

Have you tested this? This results in a syntax error due to leaving the dot in.

leave out dot. sorry