Testing Objects for Properties solution please

Testing Objects for Properties solution please
0

#1

Tell us what’s happening:
I can’t find the solution for this problem

Your code so far

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

function checkObj(checkProp) {
  // Your Code Here
  if(myObj.hasOwnProperty(checkProp)){
return myObj[checkProp];
}
else if(myObj.hasOwnProperty(checkProp) !== true){
return “Not Found”;
}
// Test your code by modifying these values
checkObj("gift");

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36.

Link to the challenge:


#2

Do you see any errors showing in the code section? I see you are missing a closing curly bracket } after your second return statement to close off the else if block of code. When you see the little red circles with a white x inside, you can click on them to see the error message.