Awee

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

macchiato

Take the last letter of a word

Input

word = "Hello"

Template

{{ word | last }}

Output

o

How is this guide?

On this page