DRAFT
AccessingInexistentPropertyError
Misconception:
Accessing a non existent property on an object produces an error.
Incorrect
Accessing a non existent property on an object produces an error
Correct
Accessing a non existent property on an object evaluates to undefined
CorrectionHere is what's right.
Here is what's right.
JavaScript is more lenient than other languages and does not throw errors when one tries to access properties that are not defined on certain objects.
The returned value is actually undefined
, as demonstrated in the next example: