> For the complete documentation index, see [llms.txt](https://docs.discorddungeons.me/quest-editor/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.discorddungeons.me/quest-editor/list-blocks/get_in_list.md).

# 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](https://602309350-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LNeYKoJ5VTmJdlF1rx1%2F-LNixCklvoD49ML8vZ_A%2F-LNixDQawJU7JaAge_uH%2Fget_in_list.jpg?generation=1538386095026555\&alt=media)

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](https://602309350-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LNeYKoJ5VTmJdlF1rx1%2F-LNixCklvoD49ML8vZ_A%2F-LNixDQcw7Ya-Y-0-3Ry%2Fget_in_list_from_end.jpg?generation=1538386095551588\&alt=media)

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](https://602309350-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LNeYKoJ5VTmJdlF1rx1%2F-LNixCklvoD49ML8vZ_A%2F-LNixDQe5_lzvSXklTmX%2Fget_first_in_list.jpg?generation=1538386096744158\&alt=media)

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](https://602309350-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LNeYKoJ5VTmJdlF1rx1%2F-LNixCklvoD49ML8vZ_A%2F-LNixDQgGADu3wE3tMkw%2Fget_last_in_list.jpg?generation=1538386095173609\&alt=media)

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

### Generated Code

```javascript
var list;

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