# Get In List Block

## In List Block

These all apply to the `get and remove` and `remove` options aswell.

## Get In List Block

![Get In List](/files/-LNixDQawJU7JaAge_uH)

The get in list block returns the item in the list with the specified index.

### Generated Code

```javascript
var list;

list[index];
```

## Get In List From End Block

![Get In List From End](/files/-LNixDQcw7Ya-Y-0-3Ry)

The get in list from end block returns the item in the list with the specified index from the end.

### Generated Code

```javascript
var list;

list.slice(-1)[index];
```

## Get First In List Block

![Get First In List](/files/-LNixDQe5_lzvSXklTmX)

The get first in list block returns the first item in the list.

### Generated Code

```javascript
var list;

list[0];
```

## Get Last In List Block

![Get Last In List](/files/-LNixDQgGADu3wE3tMkw)

The get last in list block returns the last item in the list.

### Generated Code

```javascript
var list;

list.slice(-1)[0];
```


---

# 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://docs.discorddungeons.me/quest-editor/list-blocks/get_in_list.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.
