hugo/docs/content/en/functions/collections/Shuffle.md
Bjørn Erik Pedersen 5fd1e74903
Merge commit '9b0050e9aabe4be65c78ccf292a348f309d50ccd' as 'docs'
```
git subtree add --prefix=docs/ https://github.com/gohugoio/hugoDocs.git master --squash
```

Closes #11925
2024-01-27 10:48:57 +01:00

22 lines
530 B
Markdown

---
title: collections.Shuffle
description: Returns a random permutation of a given array or slice.
categories: []
keywords: []
action:
aliases: [shuffle]
related:
- functions/collections/Reverse
- functions/collections/Sort
- functions/collections/Uniq
returnType: any
signatures: [collections.Shuffle COLLECTION]
aliases: [/functions/shuffle]
---
```go-html-template
{{ 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.