"Not Found" String not returning

Tell us what’s happening:
For some reason the “Not Found” string won’t return for gift, no matter how many different codes I try.

  **Your code so far**

function checkObj(obj, checkProp) {
// Only change code below this line
var checkObj = {
  gift: "pony",
  pet: "kitten",
  bed: "sleigh",
  city: "Seattle"
if (checkObj.hasOwnProperty(checkProp)) {
  return obj[checkProp];
} else {
  return "Not Found";
// Only change code above this line
  **Your browser information:**

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15

Challenge: Testing Objects for Properties

Link to the challenge:

What is this? You need to use the function argument obj

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