collections.Shuffle
Returns a random permutation of a given array or slice.
Syntax
collections.Shuffle COLLECTION
Returns
any
Alias
shuffle
{{ shuffle (seq 1 2 3) }} → [3 1 2]
{{ shuffle (slice "a" "b" "c") }} → [b a c]
The result will vary from one build to the next.
Last updated:
March 5, 2025
:
content: Remove "related" array from function and method pages (2fcd21ee5)
Improve this page