Last case is not Accepting

Tell us what’s happening:
Describe your issue in detail here.
My last Test case is not Working

   **Your code so far**

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


function checkObj(myobj,checkProp) {
// Your Code Here
return myObj[checkProp];
else if(myObj.hasOwnProperty(checkProp) !== true){
return "Not Found";
return "Change Me!";

// Test your code by modifying these values
   **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36

Challenge: Testing Objects for Properties

Link to the challenge:

Hello @amantech247

Kindly look closely at the instructions. A simple if-else statement should do. The object can either have the property or not have it. In that case, you should return the value of the property in the if block and the string “Not Found” in the else block.

Check it out.

You shouldn’t use (or even create) this global variable.

You need to use this function argument.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.