The things on the left are properties of the object.
Sometimes you want to know if an object has a property so for that you have the function:
.hasOwnProperty()
As you can see in the challenge:
var myObj = {
top: "hat",
bottom: "pants"
};
myObj.hasOwnProperty("top"); // true (you can see that myObj has a property called 'top')
myObj.hasOwnProperty("middle"); // false (however it doesn't have a property called 'middle')
So hopefully by repeating these basics the following is now a bit clearer:
1.Check if the given object has the given property. (the object and the property are passed into the function ‘checkObj’)
2. if it does, return the property.
3. otherwise return ‘Not found’