# array object property

[JS](/web/js.md) ⟩ [object](/web/js/val/obj.md) ⟩ [built-in](/web/js/val/builtin.md) ⟩ [Array](/web/js/val/builtin/arr.md) ⟩ [access](/web/js/val/builtin/arr/access.md) ⟩ array object property

{% hint style="success" %} <mark style="color:yellow;">**(**</mark>[value](/web/js/val.md)<mark style="color:yellow;">**)**</mark>&#x20;

if you set / access the [Array](/web/js/val/builtin/arr.md) via <mark style="color:yellow;">**anything**</mark>**&#x20;**<mark style="color:red;">**other than**</mark> <mark style="color:blue;">**nonnegative**</mark>**&#x20;**<mark style="color:yellow;">**integers**</mark>, you'll end up setting / accessing one of the array's [object properties](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#properties), which are <mark style="color:yellow;">**stored**</mark>**&#x20;**<mark style="color:red;">**differently**</mark> <mark style="color:yellow;">**from**</mark> the <mark style="color:yellow;">**list**</mark> of [element](/web/js/val/builtin/arr/element.md)(s) :exclamation:
{% endhint %}

{% tabs %}
{% tab title="⭐️ 重點" %}
{% hint style="warning" %}
:scales: **array&#x20;**<mark style="color:yellow;">**object properties**</mark> **vs**. <mark style="color:orange;">**array elements**</mark>&#x20;

* thery are <mark style="color:red;">**separate**</mark>:exclamation:
* array's [traversal and mutation operations](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Indexed_collections#array_methods) <mark style="color:red;">**cannot**</mark>**&#x20;**<mark style="color:yellow;">**be applied**</mark> to these <mark style="color:yellow;">**named properties**</mark>.

setting / accessing via <mark style="color:yellow;">**anything**</mark>**&#x20;**<mark style="color:red;">**other than**</mark> <mark style="color:blue;">**nonnegative**</mark>**&#x20;**<mark style="color:yellow;">**integers**</mark>：

* <mark style="color:yellow;">**will**</mark>**&#x20;**<mark style="color:red;">**not**</mark> set / retrieve an array element
* <mark style="color:green;">**will**</mark> set / access one of the array's [object properties](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#properties).&#x20;
  {% endhint %}
  {% endtab %}

{% tab title="👥 相關" %}
\*
{% endtab %}

{% tab title="📗 參考" %}
\*
{% endtab %}

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

* [ ] [JavaScript data types and data structures](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures) ⟩ [Properties](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#properties)
  {% endtab %}
  {% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lochiwei.gitbook.io/web/js/val/builtin/arr/obj-prop.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
