Run the code above and look at the red message:
TypeError: Cannot read properties of undefined (reading 'toUpperCase')
Every JavaScript error message is split into two parts separated by a colon (:):
1.
The error type (TypeError) — The general family of problem.
2.
The description (Cannot read properties of undefined (reading 'toUpperCase')) — Exactly what failed.