Testing Objects for Properties(Potential Bug)

Tell us what’s happening:
I tested my solution in the console panel of Chrome’s developer tool. And it worked out fine, which got me thinking there might be a bug in the testing process that the solution to this problem is limited in the form of if-else statement?

Your code so far

// Setup
var myObj = {
  gift: "pony",
  pet: "kitten",
  bed: "sleigh"

function checkObj(checkProp) {
  // Your Code Here
  return myObj.hasOwnProperty(checkProp) ? myObj[checkProp] : "Not found";

// Test your code by modifying these values

Your browser information:

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

Thank for this code. So useful

It’s just your return string. It is “Not Found” with a capital “F”.

Yes!!! Thank you so much!!! And I sincerely think that the test using in here is so not smart…