This is my solution for this challenge

this is my solution for this challenge

Your code so far

function checkObj(obj, checkProp) 
// Only change code below this 
var result ="";
if(obj.hasOwnProperty(checkProp)== true)
  result ="Not Found";
return result;
// Only change code above this line

var perInfo=
name: "hilderB",
age: 16,

checkObj(perInfo, ["sex"]); //male
checkObj(perInfo, ["height"]);// Not Found

Your browser information:

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

Challenge: Testing Objects for Properties

Link to the challenge:

I moved your topic to the the #contributors category.

Thank you, for your contribution. For future contributions, please wrap your solution within :

code goes here...

Also, provide all of the necessary code to pass the challenge.

Also, when you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor ( </> ) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).