# NodeList vs. Array

[🔰 JS](https://lochiwei.gitbook.io/web/js) ⟩ [browser](https://lochiwei.gitbook.io/web/browser) ⟩ [DOM](https://lochiwei.gitbook.io/web/browser/dom) ⟩ [types](https://lochiwei.gitbook.io/web/browser/dom/type) ⟩ [NodeList](https://lochiwei.gitbook.io/web/browser/dom/type/nodelist) ⟩ NodeList vs. Array

{% tabs %}
{% tab title="⭐️ 重點" %}
{% hint style="warning" %}

* <mark style="color:red;">**can not**</mark> use <mark style="color:blue;">push()</mark>, <mark style="color:blue;">pop()</mark>, <mark style="color:blue;">slice()</mark>, <mark style="color:blue;">join()</mark> directly on [](https://lochiwei.gitbook.io/web/browser/dom/type/nodelist "mention").
* [](https://lochiwei.gitbook.io/web/browser/dom/type/nodelist "mention") can be a [live collection](https://attacomsian.com/blog/javascript-nodelist#live-vs-static-nodelist).
* [arr](https://lochiwei.gitbook.io/web/js/val/builtin/arr "mention") is a [JavaScript](https://lochiwei.gitbook.io/web/js) built-in object, [](https://lochiwei.gitbook.io/web/browser/dom/type/nodelist "mention") is [browser](https://lochiwei.gitbook.io/web/browser) API.
  {% endhint %}
  {% endtab %}

{% tab title="📗 參考" %}

* [x] [Difference between a NodeList and an Array in JavaScript](https://attacomsian.com/blog/javascript-nodelist-vs-array)
  {% endtab %}

{% tab title="👥 相關" %}

* [arr](https://lochiwei.gitbook.io/web/js/val/builtin/arr "mention")
* [querying-elements](https://lochiwei.gitbook.io/web/browser/dom/querying-elements "mention")
  {% endtab %}
  {% endtabs %}
