From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../reference/errors/no_properties/index.html | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 files/zh-cn/web/javascript/reference/errors/no_properties/index.html (limited to 'files/zh-cn/web/javascript/reference/errors/no_properties/index.html') diff --git a/files/zh-cn/web/javascript/reference/errors/no_properties/index.html b/files/zh-cn/web/javascript/reference/errors/no_properties/index.html new file mode 100644 index 0000000000..5e904dd8ab --- /dev/null +++ b/files/zh-cn/web/javascript/reference/errors/no_properties/index.html @@ -0,0 +1,36 @@ +--- +title: 'TypeError: "x" has no properties' +slug: Web/JavaScript/Reference/Errors/No_properties +translation_of: Web/JavaScript/Reference/Errors/No_properties +--- +
{{jsSidebar("Errors")}}
+ +

错误信息

+ +
TypeError: null has no properties
+TypeError: undefined has no properties
+
+ +

错误类型

+ +

{{jsxref("TypeError")}}.

+ +

哪里出错了?

+ +

 {{jsxref("null")}} 和 {{jsxref("undefined")}}中,没有你需要的属性。

+ +

例子

+ +
null.foo;
+// 错误类型: null没有这个属性
+
+undefined.bar;
+// 错误类型: undefined没有这个属性
+
+ +

参考

+ + -- cgit v1.2.3-54-g00ecf