Tell us what’s happening:
Describe your issue in detail here.
Hello, I can’t get what does this challenge want from me, I get the testing thing but I dunno how am I supposed to have gift and not have in my objects at the same time!
**Your code so far**
function checkObj(obj, checkProp) {
// Only change code below this line
obj = {
gift: "pony",
pet: "kitten",
bed: "sleigh",
city: 'Seattle'
}
if (obj.hasOwnProperty(checkProp)) {
return obj[checkProp]
} else {
return "Not Found"
}
// Only change code above this line
}
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36
Hi…
You are creating a function that will check if the provided property(this will be passed as 2nd argument while calling the function) is available in the object(this will be passed as 1st argument while calling the function) or not.
You don’t need to create an object in your function.
I kind of did the same thing at first but i guess i must’ve had a typo or sth, then i saw these objects in my console and got confused -_-.
Thank you very so much. <3 <3