> 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](/files/-LNixDNZsvncsuztzSXF)

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](/files/-LNixDNaQSzgGG2E7k-x)

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](/files/-LNixDNcL-0zS3qpLvge)

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](/files/-LNixDNe3rcP4ORhB-Pb)

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>;
```
