Softanza
StartFrançais
Softanza
How-to · Lists

Get the first or last element of a list

Softanza
Q([ 5, 6, 7 ]).FirstItem()
#--> 5

Q([ 5, 6, 7 ]).LastItem()
#--> 7
Output
5
7

ran: printed what the recipe promises

run on 2026-10-02 22:33 inside the library at commit 0e72e2e2c; the expression carrying the promise was printed for the run · The recipe on GitHub(opens in a new tab)

The methods

stzList.FirstItem · stzList.LastItem

See also

Words for this task: first, head, front, top, last, tail, back, end, final element