I don't know why this isn't working even after going through solutions here

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**

function checkObj(obj, checkProp) {
// Only change code below this line
  return obj[checkProp];

// Only change code above this line

  **Your browser information:**

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

Challenge: Testing Objects for Properties

Link to the challenge:

Hello there.

Do you have a question?

If so, please edit your post to include it in the Tell us what’s happening section.

Learning to describe problems is hard, but it is an important part of learning how to code.

Also, the more information you give us, the more likely we are to be able to help.

1 Like

HI @greenfemi !

Welcome to the forum!

Pay close attention to the failing test cases.

Here is one of the failing ones
checkObj({gift: "pony", pet: "kitten", bed: "sleigh"}, "house") should return the string Not Found .

Your code does not return the string Not Found if the property does not exist.

Thank you. Fixed now

Awesome! Glad you were able to figure it out :grinning:
And remember, for future posts please make sure to fill out the Tell us what’s happening section of your post.
As these problems get harder, you will need to explain in detail what the issue is :grinning:

Happy coding!

Alright. I will keep that in mind. This is my first time of using this space to get solutions so i’m not really familiar with how it goes down here. Thank you for your help! I will structure my questions properly next time.

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