hugo/docs/content/en/functions/collections/Slice.md
2024-06-21 09:41:24 +02:00

436 B

title description categories keywords action aliases
collections.Slice Returns a slice composed of the given values.
aliases related returnType signatures
slice
functions/collections/Dictionary
any
collections.Slice [VALUE...]
/functions/slice
{{ $s := slice "a" "b" "c" }}
{{ $s }} → [a b c]

To create an empty slice:

{{ $s := slice }}