File: Add.md

package info (click to toggle)
hugo 0.157.0-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 43,672 kB
  • sloc: javascript: 31,888; ansic: 2,350; xml: 350; makefile: 195; sh: 110
file content (23 lines) | stat: -rw-r--r-- 436 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
---
title: math.Add
description: Adds two or more numbers.
categories: []
keywords: []
params:
  functions_and_methods:
    aliases: [add]
    returnType: any
    signatures: [math.Add VALUE VALUE...]
---

If one of the numbers is a [`float`](g), the result is a `float`.

```go-html-template
{{ add 12 3 2 }} → 17
```

You can also use the `add` function to concatenate strings.

```go-html-template
{{ add "hu" "go" }} → hugo
```