Don’t understand the explanations on previous posts so wanting to get some help here please.
This is what I have so far, but I honestly have no idea where to start ):
function checkObj(obj, checkProp) {
// Only change code below this line
if obj.hasOwnProperty(checkProp)) {
return
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/103.0.0.0 Safari/537.36
Challenge: Basic JavaScript - Testing Objects for Properties
You could return the Boolean literal true, but that is not what the instructions say. The instructions say return that property’s value. The value associated with the property will not be the Boolean literal true.
I was getting kind of frustrated so I found the answer online and would like a step-by-step explanation as to why this is the answer. I guess the way the problem was worded, I didn’t understand that any of that meant to use obj again ):
That’s the thing —now that I have the answer I can kind of read it, but I’m not in a classroom to stop the teacher and have them explain how they knew to get the answer they got.