Cannot (set|read) property XXXX of undefined

This message indicates that you are trying to work with a sub-property of a property that does not exist.

I

Here, “undefined” in the error is reference to “param,” as we are trying to set a value for the “param1” property of “param”

In this case, “undefined” is in reference to “whatever,” as we are trying to read the “knot” property of “whatever” while “whatever” is not a property of “peanuts”