Movatterモバイル変換


[0]ホーム

URL:


  1. 開発者向けのウェブ技術
  2. JavaScript
  3. JavaScript リファレンス
  4. JavaScript エラーリファレンス
  5. TypeError: "x" has no properties

このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docsコミュニティーについてもっと知り、仲間になるにはこちらから。

View in EnglishAlways switch to English

TypeError: "x" has no properties

JavaScript の例外 "null (or undefined) has no properties" は、null およびundefined のプロパティにアクセスしようとしたときに発生します。これらはプロパティを何も持ちません。

エラーメッセージ

js
TypeError: Unable to get property {x} of undefined or null reference (Edge)TypeError: null has no properties (Firefox)TypeError: undefined has no properties (Firefox)

エラータイプ

TypeError

何がうまくいかなかったのか?

nullundefined に、アクセス可能なプロパティはありません。

null と undefined にはプロパティがない

js
null.foo;// TypeError: null has no propertiesundefined.bar;// TypeError: undefined has no properties

関連項目

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp