last
Last returns the last character of a string or the last element of a slice.
Last returns the last character of a string or the last element of a slice.
Input
string array
Parameters
None
Returns
string, any
Examples
Pick the last item from a list
Input
items = ["espresso", "latte", "macchiato"]Template
{{ items | last }}Output
macchiatoTake the last letter of a word
Input
word = "Hello"Template
{{ word | last }}Output
oHow is this guide?