mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-14 20:37:55 -05:00
5fd1e74903
``` git subtree add --prefix=docs/ https://github.com/gohugoio/hugoDocs.git master --squash ``` Closes #11925
22 lines
530 B
Markdown
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.
|