summaryrefslogtreecommitdiffstats
path: root/docs/content/en/functions/slice.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/content/en/functions/slice.md')
-rw-r--r--docs/content/en/functions/slice.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/content/en/functions/slice.md b/docs/content/en/functions/slice.md
index 0710d5e40..24b717128 100644
--- a/docs/content/en/functions/slice.md
+++ b/docs/content/en/functions/slice.md
@@ -23,7 +23,9 @@ toc: false
One use case is the concatenation of elements in combination with the [`delimit` function][]:
{{< code file="slice.html" >}}
-{{ delimit (slice "foo" "bar" "buzz") ", " }}
+{{ $sliceOfStrings := slice "foo" "bar" "buzz" }}
+<!-- returns the slice [ "foo", "bar", "buzz"] -->
+{{ delimit ($sliceOfStrings) ", " }}
<!-- returns the string "foo, bar, buzz" -->
{{< /code >}}