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

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