HUGO
Menu
GitHub 90265 stars Mastodon

math.Add

Returns the result of adding one or more numbers to the first number.
Syntax
math.Add VALUE VALUE...
Returns
any
Alias
add

Usage

The math.Add function returns the result of adding one or more numbers to the first number. If one of the numbers is a float, the result is a float.

You can also use this function to concatenate strings.

Examples

{{ math.Add 12 3 2 }} → 17
{{ math.Add 12 3.5 }} → 15.5

Concatenating strings:

{{ math.Add "hu" "go" }} → hugo