Basic JavaScript: Testing Objects for Properties(Doesn't Work)

I tried in several ways, but it doesn’t work, please did someone try and it didn’t work? Even using the correct code? If someone has succeeded please answer me here

I search in StackOverFlow and a friend send me this and works:
// Only change code below this line

function checkObj(obj, prop) {

if (obj.hasOwnProperty(prop)) {

    return obj[prop];

} else {

    return "Not Found";


// Only change code above this line


If you have a question about a specific challenge as it relates to your written code for that challenge, just click the Ask for Help button located on the challenge. It will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

I finished the challeng with the code above, thankyou

next time, when you have a question about one of the freecodecamp challenges, please use the Ask for help button.