I’m trying to Ouput the property value and it just outputs the property.
Here is what I have so far.
// Setup
var myObj = {
gift: "pony",
pet: "kitten",
bed: "sleigh"
};
function checkObj(checkProp) {
// Your Code Here
if(myObj.hasOwnProperty(checkProp) == true)
{
return checkProp;
}
else{
return "Not Found";
}
}
// Test your code by modifying these values
checkObj("pet");
Your browser information:
Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0
.
Link to the challenge:
https://www.freecodecamp.org/challenges/testing-objects-for-properties