Why does accessing a non-existent object property result in `undefined` instead of throwing a `ReferenceError`?

Because object properties are not variables. The rules are different. Accessing an object property that doesn’t exist gives you undefined, not an error. It’s just the way the language is designed. One possible explanation for the difference, other than just that “that’s how Eich designed it,” is that you don’t declare object properties. You just … Read more