---
description: a value item contained in an array.
---

# element

[JS](../../..) ⟩ [object](../../obj) ⟩ [built-in](..) ⟩ [Array]() ⟩ element

{% hint style="success" %}
the [..](../.. "mention")(s) stored in the [](<> "mention").
{% endhint %}

{% tabs %}
{% tab title="⭐️ 重點" %}
{% hint style="success" %}
<mark style="color:purple;">**array elements**</mark> are usually <mark style="color:yellow;">**accessed**</mark> by [property-access-expression](../../obj/prop/access/property-access-expression "mention"), <mark style="color:yellow;">**using**</mark> [dot-notation-.](../../obj/prop/access/dot-notation-. "mention") <mark style="color:yellow;">**/**</mark> [bracket-notation](../../obj/prop/access/bracket-notation "mention").
{% endhint %}

{% hint style="warning" %}
[**deleting**](../../obj/prop/create/delete) an array <mark style="color:purple;">**element**</mark> leaves a “<mark style="color:yellow;">**hole**</mark>” in the array and <mark style="color:red;">**does not**</mark>**&#x20;**<mark style="color:yellow;">**change**</mark> the array’s <mark style="color:yellow;">**length**</mark>:exclamation: ([sparse](sparse "mention"))
{% endhint %}
{% endtab %}

{% tab title="👥 相關" %}
* :white\_check\_mark: <mark style="color:purple;">**array elements**</mark> are <mark style="color:yellow;">**accessed**</mark> throught [index](element/index "mention") using [bracket-notation](../../obj/prop/access/bracket-notation "mention").
* array <mark style="color:purple;">**element**</mark> is a [lvalue](../../../grammar/op/term/lvalue "mention").
* [**...iterable**](../../../grammar/op/spread) <mark style="color:yellow;">**expands**</mark> an [**iterable**](../../../iteration/iterable) in places where <mark style="color:purple;">**elements**</mark> are expected.&#x20;
{% endtab %}

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

{% tab title="📘 手冊" %}
* Guides ⟩ Arrays ⟩ [Accessing and modifying array items](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/Arrays#accessing_and_modifying_array_items) ⭐️
{% endtab %}
{% endtabs %}
