# add

Adds all of the given numbers.

Accepts int and float.

* If any floats are given, float is returned.
* If no floats are given, int is returned.

#### Syntax

```
add(value1, value2, ...)
```

#### Arguments

* **values** (`int | float`) - Two or more numeric values to add.

#### Examples

**Integer addition**

```
add(1, 2, 3)
// 6
```

**Float addition**

```
add(1.5, 2.5)
// 4.0
```

**Add values from an array using spread**

```
[1, 2, 3].add($this...)
// 6
```

**CLI usage**

```bash
$ echo '{"a": 10, "b": 20}' | dasel -i json 'add(a, b)'
30
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://daseldocs.tomwright.me/functions/add.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
