This page was translated from English by the community.Learn more and join the MDN Web Docs community.
TypeError: "x" has no properties
Сообщение
TypeError: Unable to get property {x} of undefined or null reference (Edge)TypeError: null has no properties (Firefox)TypeError: undefined has no properties (Firefox)In this article
Тип ошибки
Что пошло не так?
Уnull иundefined нет свойств, к которым можно было бы обратиться.
Примеры
js
null.foo;// TypeError: null has no propertiesundefined.bar;// TypeError: undefined has no properties