From Dev.to
TypeError: Cannot read properties of undefined (reading 'x') in JavaScript: 10 Causes and Fixes
"TypeError: Cannot read properties of undefined (reading 'x')" means you tried to read .x from a value that is undefined. The name in brackets is the property you asked for; the real problem is the th...
