---
# System prepended metadata

title: Array structure

---

# Array structure

function sum( a,  b ) { ..... }

Memory(sum)
|---------|
|    a    |  0
|---------|
|	 b    |  1
|---------|
|    .    |  2
|---------|
|    .    |  3
|---------|

Accessing Data via index
```
function sum({ a,  b }) { ..... }
```
on first index has object

Memory(sum)
```
|---------|
|    a    |  key
|---------|
|    b    |  key
|---------|
|    .    |  key
|---------|
|    .    |  key
|---------|

```
Accessing Data via key


```
const keys = {
	"key1": ".....",
	"key2": "....."
	"key3": "....."
	"key4": "....."
	...............
	"keyn": "....."
}
```

required key1, key2, method? => destructure method

```javascript=
const { key1, key2 } = keys

// X not working
const { TopUser, SecondTop } = keys

key1, key2

const { key1: TopUser , key2: SecondTop } = keys

TopUser, SecondTop


// Array structure
const numbers = [0, 1, 2, 100, 400];

const [ stateZero, AnotherOne ] = numbers;
```