# cannot read properties of nullish❗️

[JS](https://lochiwei.gitbook.io/web/js) ⟩ [error](https://lochiwei.gitbook.io/web/js/err) ⟩ [TypeError](https://lochiwei.gitbook.io/web/js/err/type) ⟩ cannot read properties of nullish:exclamation:

{% hint style="warning" %}
[<mark style="color:red;">**TypeError**</mark>](https://lochiwei.gitbook.io/web/js/err/type)：[<mark style="color:yellow;">**cannot read properties of nullish**</mark>](https://lochiwei.gitbook.io/web/js/err/type/cannot-read-properties-of-nullish):exclamation:
{% endhint %}

{% tabs %}
{% tab title="⭐️ 重點" %}
{% hint style="success" %}
this error occurs when accessing properties of [`null`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/null) / [`undefined`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined).
{% endhint %}
{% endtab %}

{% tab title="✨ 範例" %}

* [property-access-expression](https://lochiwei.gitbook.io/web/js/val/obj/prop/access/property-access-expression "mention")
* [dot-notation-.](https://lochiwei.gitbook.io/web/js/val/obj/prop/access/dot-notation-. "mention") - when <mark style="color:blue;">`obj`</mark> is nullish.
  {% endtab %}

{% tab title="📘 手冊" %}

* [TypeError: "x" has no properties](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/No_properties)
  {% endtab %}
  {% endtabs %}
