Basic JavaScript - Testing Objects for Properties

I’m totally stuck on this. I haven’t written any code yet.
I understand the example perfectly but can’t understand how the function works in this context.
Am I supposed to create an object inside the function with all the gift: pony etc?
I’ve found some help online but it seems the lesson has been changed a lot. It’s much more confusing now to the version before.

  **Your code so far**
function checkObj(obj, checkProp) {
// Only change code below this line

return "Change Me!";
// Only change code above this line
  **Your browser information:**

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

Challenge: Basic JavaScript - Testing Objects for Properties

Link to the challenge:

No. The object is passed into the function when the function is called.

The old version was actually really confusing. Hard coding the object is something that you rarely/never do in real professional code.

1 Like

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