> 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/edit_in_list.md).

# Edit In List Block

## Edit List Blocks

These all apply to the `insert at` option aswell.

## Set In List Block

![Set In List](https://602309350-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LNeYKoJ5VTmJdlF1rx1%2F-LNixCklvoD49ML8vZ_A%2F-LNixDNZsvncsuztzSXF%2Fset_list_index.jpg?generation=1538386094441298\&alt=media)

The set in list block sets the item in the list with the specified index to the specified value.

### Generated Code

```javascript
var list;

list[index] = <value>;
```

## Set In List From End Block

![Set In List From End](https://602309350-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LNeYKoJ5VTmJdlF1rx1%2F-LNixCklvoD49ML8vZ_A%2F-LNixDNaQSzgGG2E7k-x%2Fset_list_index_from_end.jpg?generation=1538386095043295\&alt=media)

The set in list from end block sets the item in the list with the specified index from the end to the specified value.

### Generated Code

```javascript
var list;

list[list.length - <index>] = <value>;
```

## Set First In List Block

![Set First In List](https://602309350-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LNeYKoJ5VTmJdlF1rx1%2F-LNixCklvoD49ML8vZ_A%2F-LNixDNcL-0zS3qpLvge%2Fset_first_item.jpg?generation=1538386095011262\&alt=media)

The set first in list block sets the first item in the list to the specified value.

### Generated Code

```javascript
var list;

list[0] = <value>;
```

## Set Last In List Block

![Set Last In List](https://602309350-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LNeYKoJ5VTmJdlF1rx1%2F-LNixCklvoD49ML8vZ_A%2F-LNixDNe3rcP4ORhB-Pb%2Fset_last_item.jpg?generation=1538386095565754\&alt=media)

The set last in list block sets the last item in the list to the specified value.

### Generated Code

```javascript
var list;

list[list.length - 1] = <value>;
```
