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

# Find Index Block

![Find Index Block](/files/-LNixDOdgAXctmt1biMo)

Returns the index of the first/last occurrence of the item in the list. Returns 0 if item is not found.

## Generated Code

**first**

```javascript
var list;

list.indexOf('') + 1;
```

**last**

```javascript
var list;

list.lastIndexOf('') + 1;
```
