Get to know MDN better
此頁面由社群從英文翻譯而來。了解更多並加入 MDN Web Docs 社群。
當你嘗試存取 null 和 undefined 的屬性時,會發生 JavaScript 的「null (or undefined) has no properties」例外,因為它們沒有任何屬性。
null 和 undefined 都沒有可以存取的屬性。因此,你不能對它們使用屬性存取器,也不能解構它們。
This page was last modified on 2026年2月2日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.