mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 15:28:54 +00:00
Simplify string concat example in math.Add
This commit is contained in:
@@ -26,10 +26,5 @@ If one of the numbers is a [`float`], the result is a `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
|
||||
{{ add "hu" "go" }} → hugo
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user