Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

index

Consumes a list and returns the item at a specified index. Indexes wrap around the list, and negative indexes start at the end of the list.

[ 1 2 3 4 5 ] copy 2 index[ 1 2 3 4 5 ] 3

[ 1 2 3 4 5 ] 5 index1

[ 1 2 3 4 5 ] -1 index5