Testing Objects for Properties - Help please

Tell us what’s happening:

I don’t understand why my code is false !

Your code so far

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

function checkObj(checkProp) {
  // Your Code Here
  return myObj["gift"];  
  return myObj["pet"];  
  return myObj["bed"];
  return "Not found";
// Test your code by modifying these values

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36.

Link to the challenge:

You’ve hardcoded properties to test for, read what the challenge is asking you to test for (hint: you are passing an argument to the function but in your code you haven’t used it at all)

Ok thanks i get it but i don’t know how to translate it into code !

I got to use checkProp I think

Look at the values you have hard coded, and look at the example:


The argument being passed in is checkProp

Ok i got it ! Thank you :slight_smile: