TypeError: "x" has no properties
Message
JavaScript
Copy Code
TypeError: null has no properties TypeError: undefined has no properties
Error type
What went wrong?
Both, null
and undefined
, have no properties you could access.
Examples
JavaScript
Copy Code
null.foo; // TypeError: null has no properties undefined.bar; // TypeError: undefined has no properties
See also
License
© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/javascript/reference/errors/no_properties