Add string concat example to math.Add

This commit is contained in:
Joe Mooring 2024-01-28 08:42:30 -08:00 committed by GitHub
parent eb20521a20
commit 42488bb097
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -22,3 +22,14 @@ If one of the numbers is a [`float`], the result is a `float`.
```
[`float`]: /getting-started/glossary/#float
You can also use the `add` function to concatenate strings.
```go-html-template
{{ $s := slice "h" "u" "g" "o" }}
{{ $t := "" }}
{{ range $s }}
{{ $t = add $t . }}
{{ end }}
{{ $t }} → hugo
```