Accessing object properties with dot and bracket notation

https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/testing-objects-for-properties/

To access the object property assigned to ‘checkProp’ in this exercise, only the bracket notation seems to work in the return line.
return myObj[checkProp];

The dot notation is not working,
return myObj.checkProp;

Can someone explain why?

Thank you! This was helpful