blob: d699a0767fe416c8be2c4984329577ebe6b577f4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
---
title: 'TypeError: "x" has no properties'
slug: Web/JavaScript/Reference/Errors/No_properties
tags:
- Errors
- JavaScript
- TypeError
translation_of: Web/JavaScript/Reference/Errors/No_properties
---
<div>{{jsSidebar("Errors")}}</div>
<h2 id="メッセージ">メッセージ</h2>
<pre class="syntaxbox">TypeError: null has no properties
TypeError: undefined has no properties
</pre>
<h2 id="エラータイプ">エラータイプ</h2>
<p>{{jsxref("TypeError")}}。</p>
<h2 id="何がうまくいかなかったのか?">何がうまくいかなかったのか?</h2>
<p>{{jsxref("null")}} と {{jsxref("undefined")}} に、アクセス可能なプロパティはありません。</p>
<h2 id="例">例</h2>
<pre class="brush: js example-bad">null.foo;
// TypeError: null has no properties
undefined.bar;
// TypeError: undefined has no properties
</pre>
<h2 id="関連項目">関連項目</h2>
<ul>
<li>{{jsxref("null")}}</li>
<li>{{jsxref("undefined")}}</li>
</ul>
|